Results 1 to 3 of 3

Thread: dbSilentCmdText and transactions?

  1. #1
    Martin Jocic Guest

    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

  2. #2
    John Guest

    dbSilentCmdText and transactions? (reply)

    Hi Martin,

    ASP-db wraps the editing functions (add, update, delete) inside transactions
    and rolls them back if they&#39;re unsuccessful (records affected <> 1). It
    doesn&#39;t wrap the &#34;main query&#34; as there&#39;s nothing to &#34;roll back&#34;, it&#39;s just
    a display query.

    dbSilentCmtText isn&#39;t wrapped because there&#39;s no way to know what a
    &#34;successful&#34; result is. You could be doing multiple deletes, updates, etc.
    in your command and we have no way of knowing what &#34;success&#34; 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

  3. #3
    Martin Jocic Guest

    dbSilentCmdText and transactions? (reply)

    What I meant is that you should wrap both the &#34;silent&#34; 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 &#34;edit&#34; 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&#39;re unsuccessful (records affected <> 1). It
    doesn&#39;t wrap the &#34;main query&#34; as there&#39;s nothing to &#34;roll back&#34;, it&#39;s just
    a display query.

    dbSilentCmtText isn&#39;t wrapped because there&#39;s no way to know what a
    &#34;successful&#34; result is. You could be doing multiple deletes, updates, etc.
    in your command and we have no way of knowing what &#34;success&#34; 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
  •