Results 1 to 2 of 2

Thread: SQL Server Transaction ??

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    calcutta,india
    Posts
    48

    Question SQL Server Transaction ??

    When transaction is active and one open a recordset.Is transaction is auto commited ? In my case when i commit trans
    i get error stating there is no 'begin trans' active. I have opened 2 recordset with in transacton using ado. Same error occured when trans rolledback.

    Any one have clear view what to do or not do when a transaction is active.

    Which method is best to start a transacton -

    a).BeginTrans method of connection object OR
    b).'Begin Trans' statement of sql server

    Can i use recordset addnew method and insert statement with in a same active transaction .

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I'm having trouble understanding your question, but I can tell you that you should be doing something like this:

    VB Code:
    1. objconn.begintrans
    2.  
    3. ' code here
    4. ' more code
    5.  
    6. objconn.committrans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width