Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: Nested Transaction Error? I thought SQL Server had that! VC++/ADO


Message #1 by "Girish Bajaj" <gbajaj@i...> on Wed, 16 May 2001 21:46:07 -0500
I recently got started on a VC++ (COM)/ ADO / SQL Server 2000 project and am

facing a very weird error... Id appreciate any help that may isolate this

problem..



The project until now used MS ACCESS and now in the recent build we are

trying to move the database to SQL Server 2000.



I myself am working on a section of the code where there are series of

select statements and one update statement being executed against the

database.



One point to note here is that the project uses some high level objects,

where you invoke some update() method, and it internally calls some custom

ADO wrappers to actually do the update. E.g. User.UpdateUser(.....) will

internally call some other object myDb.update(...) to do the update...



Next Point: The Object that does the Update is within a Transaction. I also

know for a fact that the custom ADO wrapper classes also start their own

transactions (dont ask me why they do it twice! I wish  knew enough to

Question it.) ;)



When the project runs, it bombs on the updateUser() statement of the object.

The error I get is "Cannot Start more Transactions on this Session."



I KNOW that SQL Server 2000 supports nested transactions... so why does this

error occur? Im using OLE DB to connect - and its an ole db error.



The code is too big and really messed up to post here! ;)



Thanks,

Girish






  Return to Index