Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 CommitTrans before BeginTrans

Status
Not open for further replies.

flo55y

Programmer
Aug 6, 2003
21
GB
Hi Folks,

This is driving me up the wall!

I have a VB6 app running against an access database using the standard opendatabase type connections (.execute .openrecordset .movenext etc)

I'm trying to introduce transactions into part of the system and so I've defined the workspace and issued the .BeginTrans. However, if I perform any action on the DB (ie even building a select statement and opening a new recordset) and then try to issue the .CommitTrans I get...
"You tried to commit or roll back a transaction without first using BeginTrans"

I've managed to get it to work on the same database in a noddy project successfully with selects and updates. Has anyone any suggestions as to what I'm doing wrong?

Thanks in anticipation.

Cheers, Graham.
 
Nothing obvious, are you sure the begintrans and committrans are against the same workspace ?
 
Hi,

I've only got the one workspace defined.

I've displayed the properties of the workspace after the begintrans and before the committrans and they are the same.

One difference between the app and the noddy project is that the app is an MDI whereas the noddy is just a couple of forms. Though I didn't think this would make any difference to the results of the transaction processing.

Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top