CommitTrans

P

Peter

I am doing several tables update and I am using Begin and Commit Trans method. After the CommitTrans, I try to requery one of the tables (table3), I can get all expected records. But if I try to open it, I get runtime error "3021" saying "Either BOF or EOF is true, or the current record has been deleted. Requested operation requires a current record."

Can anyone help me to understand this?

Thanks
 
A

Allen Browne

We might need a bit more detail to pinpoint this.

What version and service pack is this? There is an known issue with error
3021 on Access 2002 SP3.

We may also need to know whether you BeginTrans on the dbEngine object or
the Workspace object (DAO), or if you are using ADO transactions.

With DAO, it is important not to close the default workspace. Example of
this and related issues at:
http://allenbrowne.com/ser-37.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Peter said:
I am doing several tables update and I am using Begin and Commit Trans
method. After the CommitTrans, I try to requery one of the tables (table3),
I can get all expected records. But if I try to open it, I get runtime
error "3021" saying "Either BOF or EOF is true, or the current record has
been deleted. Requested operation requires a current record."
 
A

Allen Browne

Hi Peter.

I don't use ADO, but you opened rst1 inside the transaction, so try closing
it, setting it to Nothing, then committing, then opening it again.
 
P

Peter

I did try closing rst1 after transaction commit. I will try your way. I am using rst2 to open it again.

Allen, do you know any books or reference talking deeply inside ADO?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top