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

Runtime error

Status
Not open for further replies.
Oct 28, 2003
50
MY
Hello....
I have a form that is bound to a query that are build from another query.
When i open up my form.....an SQL statement based on that query will run....and the form will be displaying only the required data.........

My problem is that.....some PC can go through this process (the opening of my form and displaying the required data) just fine.....but on some PCs...this error msg appear:

'ODBC-CALL FAILED-IBM CLIENT ACCESS EXPRESS ODBC DRIVER (32 BIT)[DB2/400SQL]SQL0666-
ESTIMATED QUERY PROCESSING TIME 72 EXCEEDS LIMIT 60 (#-666)'

Can anybody tells me why this error occur? All PCs are using Windows 98 with Office 2000.....
 
Are you on a NT network? If so, the answer is permissions. Do all of the PC's have the most resent service packs installed? Is the error occuring on one maufactures brand of PC, like Gateway? Just a couple of things to look at, isn't debugging fun? I just finished one where the drives where not mounting/linking on a couple PC's and those PC where taking a nose-dive when ever I opened a form on them, but everything ran great everywhere else. Good luck, I hope this helps.
 
Thanks....but i'm not on the NT network...
I've take a look at Ms Access help.....and it says that the ODBC timeout for the query that is bound to the form should be set to 0. In my case the problem is that i'm using an SQL statement on the query that is bound to my form....so I have to set the ODBC timeout in VBA but I don't know how....

This is my SQL statement:
Dim ssql As String
Dim scriteria As String
scriteria = "WHERE 1=2 "

ssql = "SELECT [JOBNO], [SUBJOB], [OBJECT], [DESC], [ACCID], [AMOUNT] from QRYACCDETAIL" & scriteria

Me.Form.RecordSource = ssql
Me.Requery

Anybody know how to set the ODBC timeout in VBA???????
 
hi...
well i manage to solve this problem already...

It turns out that the ODBC timeout for the query to my subform is not set to 0.....so....i actually doesn't have to set the ODBC timeout in VBA at all........

:)
 
So where exactly does one find the timeout value that you are talking about?
 
In the query design view. Then right click anywhere on the query....but not in the query fields area.....then select Properties.....then u can find ODBC Timeout field. The default value of this field is set to 60...change this value to 0....

that's it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top