Transactions on Sql Server

  • Thread starter Thread starter Bernardo Iglesias
  • Start date Start date
B

Bernardo Iglesias

Access 2000 VBA

I have a problem with transactions which I've isolated
into a simpler code like this

Sub pruebatransacc()
Dim r As Recordset
DBEngine.beginTrans
Set r = CurrentDb.OpenRecordset("select * from enti")
r.addNew
r("nombre_enti") = "prueba"
r.Update
Set r = CurrentDb.OpenRecordset("select * from enti")
DBEngine.rollback
End Sub

If 'enti' is a linked table located on Oracle, it works
fine. But if it's Sql Server, the code hangs on the second
openrecordset, until the odbc timeout is reached.

Searching in Microsoft info, i've found that JET issues a
connection for each query, so the server locks the second
one, thinking that the first one has the transaction
pending. But, if it's a jet problem, why it works on
Oracle?

I'm very confused with this, can someone help me?

mmm this code is the simpler example, the real code is
huge. Please, don't say "make it passthrough". It's not
two queries. It's a beast. There are a lot of sql's inside
transactions, relying on the rollback feature...

Thanks anyway. Poor english, you've noticed, eh ;-)
 
Yourself???

Didn't I answer this in "microsoft.public.access" newsgroup?

Perhaps, you should acknowledge properly next time and do not multi-post
your question.
 
Back
Top