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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO - connection gets lost? 1

Status
Not open for further replies.

Dauphy

IS-IT--Management
Nov 8, 2001
111
CA
I'm using VB6 and connecting to an Access 2000 database. I've written a program to loop through a table and create a query on the fly. That query updates query #2 and based on the results of query #2; a record may or may not be included in a new recordset.

This is my problem... the program works just fine; and then decides not to be able to find the query in the middle of the loop. And it's not always at the same record. It may process 5 records; and the next time it may process 10 records... This is the message that appears ... The Microsoft Jet Database Engine cannot find the input table or query query name. Make sure it exists and that it's name is spelled correctly. When I look at the database it does exist, so for some reason - it loses its reference to it. Has anyone encountered this problem???

Thank you.
 
Hey,

You may need to set your CommandTimeout to something like 150 or so. Your query/queries may be working hard and timing out.

ex.
cn.open <parameters>
cn.CommandTimeout = 150

Chad
 
Thanks Chad: That must be it; before I increased it It wouldn't process more than 20 records; I got up to 124 this time.... I I need it to get up to 1,000; so I'll bump it some more.


Patti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top