Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL Server transactions

Author  Topic 

sabbatini
Starting Member

2 Posts

Posted - 2005-04-27 : 16:12:31
I have linked tables from Access 97 to SQL Server 97. I'm programming in VB with DAO. If I begin a transaction, add a new record to a table and then I tray to edit this record within the same transaction I get the following error "ODBC Call fail".

Example: (Bank is a SQL Server linked table in Access)

DBEngine.BeginTrans
' dbmaster is an Access 97 database !!!
dbMaster.Execute "INSERT INTO Bank (Id, Descrip) VALUES( '1' , 'BIGDOLAR' )"
dbMaster.Execute "UPDATE Bank SET Descrip='BIGDOLLAR' WHERE Id=1"
DBEngine.CommitTrans

The second execute fails. Why? Thanks.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-04-27 : 17:10:19
Perhaps it doesn't see it if you have not committed the transaction?


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -