manual or distributed transaction mode.

  • Sometimes I got error in my ADO/Cplusplus code:

    Code = 80004005

    Code meaning = Unspecified error

    Source = Microsoft OLE DB Provider for SQL Server

    Description = Cannot create new connection because in manual or distributed transaction mode.

    then followed by:

    Error number: 8000ffff ITransaction::Commit or ITransaction::Abort was called, and object is in a zombie state.

    would remove the explicit transaction help?

    ...

    _RecordsetPtr pRst = NULL;

    _CommandPtr pCmd = NULL;

    _ConnectionPtr pConn = NULL;

    ...

    pRst->CursorType = adOpenStatic;

    pRst->CursorLocation = adUseClient;

    pRst->LockType = adLockReadOnly;

    ...

    pConn->BeginTrans(); // to be removed?

    pCmd->PutActiveConnection(_variant_t((IDispatch*)pConn));

    pRst = pCmd->Execute(NULL,NULL,adCmdText);

    pConn->CommitTrans(); // to be removed?

    your insights are appreciated.

    Zack Hu

  • Suggest you try a C++ centric web site, or maybe the MS ADO newsgroup. Sorry we cant help more than that.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply