Subject | Re: [IBO] Newbie transaction questions |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2002-12-10T12:46:38Z |
Joe,
you will continue to have problems until you start using generators to
create your keys. But you don't have to make them visible to your users.
With IBObjects, using generators is extremely simple. I would guess you've
already spent more time asking questions on this list about how to make
your system work without generators than the time it would have taken you
to implement them. As for your sale numbers (forget using them as keys),
take a look at "An Auditable Series of Numbers" which you can download from
http://www.ibobjects.com/TechInfo.html.
Set
you will continue to have problems until you start using generators to
create your keys. But you don't have to make them visible to your users.
With IBObjects, using generators is extremely simple. I would guess you've
already spent more time asking questions on this list about how to make
your system work without generators than the time it would have taken you
to implement them. As for your sale numbers (forget using them as keys),
take a look at "An Auditable Series of Numbers" which you can download from
http://www.ibobjects.com/TechInfo.html.
Set
>Ok, some clarifications:
>
>If User A and User B both insert with the same key before either commits,
>will both
>INSERTS succeed without Key Violations, and the Key Violation occurs with the
>second COMMIT (not INSERT)?
>
>What if User A inserts and commits, then User B inserts? Will User B get
>a Key
>Violation on the INSERT, or on it's COMMIT?
>
>Can both inserts and commits generate Key Violations (depending on the
>situation),
>or is it only commits?
>
>Another question: If I start a transaction and try to insert (or insert
>and commit) and
>get a Key Violation, and I need to change the query (or paramaters) and
>retry, what
>exactly would I do?
>Rollback transaction, Start transaction, change SQL, Execute again
>or, do I even have to bother rolling back and restarting? Can I just
>change the SQL
>and re-Execute? What if the insert succeeded, but the commit failed?
>
>-Joe