PDA

Click to See Complete Forum and Search --> : Problems with transactions and RDO.


Grinaldo
Aug 13th, 1999, 02:04 AM
Pay attention on the code below:

Set cnrdo = rdoEnvironments(0).OpenConnection("", rdDriverNoPrompt, False, "DRIVER=SQL SERVER;SERVER=NT_DADOS;DATABASE=PUBS;UID=sa;PWD=")

Set rstrdo = cnrdo.OpenResultset("SELECT * FROM AUTHORS", rdOpenDynamic, rdConcurValues)

cnrdo.BeginTrans
cnrdo.CommitTrans

debug.print rstrdo.rowcount

This "debug.print" will work or not ?

It won't, because CommitTrans's method will close all of the recordsets that were opened in or out of transaction. is this behavior correct ?

I have a serious problem with that. When I have more than one form opened, with also recordset opened , after a COMMITRANS or ROLLBACKTRANS my recordsets has closed. I don't want that!

I use RDO 2.0 and RDO 1.0.

If anybody knows the solution, send me a e-mail. My e-mail is grinaldo@unitech.com.br.

Thank you.