Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do .execute queries take a lot of resources? 1

Status
Not open for further replies.

steve728

Programmer
Mar 16, 2003
536
US
I've recently converted old ADO rs.open action queries (INSERT INTO and UPDATE) into ADO.execute ,,129 ones. Now my MS Access 2003 application is frequently closing down. Any ideas how to prevent this? The first time the program runs (including about 10 30 action queries) it works fine. Run it again and it shuts the application down. If I close MS Access and rerun the application all works fine until I run the procedure for the 2nd time in this session.

Steve
O/S Win XP, 768 RAM, Processor: 2.7Mz, No other apps running. Please help!

I open the connection prior to running these queries then close the connection after the last run runs. Code Sample:

CurrentProject.Connection.Execute "INSERT INTO PRRTRANS ([reference], mdate,[name],empcode,[date]) Values ('" & Nextone & "', #" & Now() & "#, '" & Trim(rsPRCheck.Fields("name").VALUE) & "', '" & rsPRCheck.Fields("empcode").VALUE & "', #" & prDate & "#)", , 129
 
I already tried replacing all the .executes with docmd.runsql. Same problem.

Steve
 
What is rsPRCheck ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
My son just called me to tell me that loading Service Pack 2 for Office 2003 fixed the problem!

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top