Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Posts
    2

    Unanswered: SQL2000 - Runtiime Error

    I am using VB 6.0, Ado 2.6 connect to SQL2000. When I used Begin transaction I hit the error Runtime error "2147168227 (8004d01d) " - Cannot create new transaction because capacity was exceeded.

    I have check my SQL2000 transaction log and it is being set to automatically increase by 10% and also the database. The HDD still has gigabytes of space.

    Any idea how to solve this problem.

  2. #2
    Join Date
    May 2002
    Posts
    299

    Re: SQL2000 - Runtiime Error

    Is your database is set to ReadOnly by any chance. Also, please check out "checkpoint" in sql book online for some details regarding truncate log.
    --
    -oj
    http://www.rac4sql.net

  3. #3
    Join Date
    Apr 2002
    Posts
    20

    Re: SQL2000 - Runtiime Error

    jfchim,

    Here are some notes directly from MSDN which may help.
    (INFO: Understanding ADO Transactions with MS SQL Server)

    By default ADO operates in AutoCommit mode, unless you start a implicit transaction by executing Connection.BeginTrans.

    Implicit_transactions begin a transaction on the server for each statement, and commits do not occur until they are manually issued.

    So,
    set implicit_transactions on
    go
    insert
    insert
    insert

    is internally turned into
    BEGIN TRAN
    Insert
    insert
    insert
    ...

    The above transaction will not be rolled back or committed unless the user issues the correct statement.

    Without implicit transaction, which by default is the behavior of ADO (Auto Commit mode), the following is (conceptually) occurring:
    begin tran
    insert
    commit tran
    begin tran
    insert
    commit tran
    ...

    --jfp

  4. #4
    Join Date
    Mar 2003
    Posts
    2
    I have found some documentation on the Runtime Error from this site

    http://p2p.wrox.com/archive/activex_.../2002-03/6.asp

    I have tested it and it is working. But it is the correct way?

  5. #5
    Join Date
    Apr 2002
    Posts
    20
    If you used, connection.execute("Begin Transaction") , this is a great way to do it. You are bypassing anything ADO may impose.

    And also as recommended, remember to get out quickly as any transaction risks locking all those records.

    --jfp

    Originally posted by jfchim
    I have found some documentation on the Runtime Error from this site

    http://p2p.wrox.com/archive/activex_.../2002-03/6.asp

    I have tested it and it is working. But it is the correct way?

Posting Permissions

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