-
dbSilentCmdText and transactions?
Does AspDb wrap the main query and the SQL commands in dbSilentCmdTexts inside a transaction so that everything is rolled back if any of them fails?
If not, please consider this as a request.
Martin Jocic
-
dbSilentCmdText and transactions? (reply)
Hi Martin,
ASP-db wraps the editing functions (add, update, delete) inside transactions
and rolls them back if they're unsuccessful (records affected <> 1). It
doesn't wrap the "main query" as there's nothing to "roll back", it's just
a display query.
dbSilentCmtText isn't wrapped because there's no way to know what a
"successful" result is. You could be doing multiple deletes, updates, etc.
in your command and we have no way of knowing what "success" is.
Hope this helps. Thanks,
John
------------
Martin Jocic at 9/8/99 11:36:36 AM
Does AspDb wrap the main query and the SQL commands in dbSilentCmdTexts inside a transaction so that everything is rolled back if any of them fails?
If not, please consider this as a request.
Martin Jocic
-
dbSilentCmdText and transactions? (reply)
What I meant is that you should wrap both the "silent" and the main SQL statements inside a transaction and do a rollback if you detect a runtime error from the underlying database. As you pointed out this is only needed with "edit" queries. The point is that if anything goes wrong with the edit query I want to be able to cancel the silent SQL statements and vice versa.
Martin
------------
John at 9/8/99 5:59:18 PM
Hi Martin,
ASP-db wraps the editing functions (add, update, delete) inside transactions
and rolls them back if they're unsuccessful (records affected <> 1). It
doesn't wrap the "main query" as there's nothing to "roll back", it's just
a display query.
dbSilentCmtText isn't wrapped because there's no way to know what a
"successful" result is. You could be doing multiple deletes, updates, etc.
in your command and we have no way of knowing what "success" is.
Hope this helps. Thanks,
John
------------
Martin Jocic at 9/8/99 11:36:36 AM
Does AspDb wrap the main query and the SQL commands in dbSilentCmdTexts inside a transaction so that everything is rolled back if any of them fails?
If not, please consider this as a request.
Martin Jocic
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|