Connection Object's Execute Metthod (ADO) Only works on Debug Mode

G

Guest

Hi,

I am using Access 2002 on Windows XP. I have a strange problem!, need your
expert advise. I have written a Module to manipulate data and write into
another table. The module is compiled and work fine when I run the code in
debug mode. However, when the same code run on run-time (without debug mode),
it does not work. The Insert Query triggered using Connection object's
Execute method fails.

Could anyone know why this happens and help asap.

Thanks
Regards
K.S.Jaishankar
 
G

Guest

Hi,

Found an alternative that works. Just for info to all of you;

Set cnnDB = currentproject.connection
cnnDB.execute strSQL
OR 'Opening Recordset
rstIR.open strSQL, cnnDB

The above method(s) does not work in most of the cases. The alternative is;
using command object with connection set to currentproject.connection
and for recorset
rstIR.open strSQL, currentproject.connection

Hope this is useful to all. However, I am not able identify why cnnDB method
does not work.

Regards
K.S.Jaishankar
 

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