ODBC timeout

nileshtx

New member
Local time
Today, 16:19
Joined
Apr 3, 2002
Messages
9
I have this code in a module that keeps timeing out after 60 seconds is there a way to make it run for at least 10 minutes.

Dim db As Database
Dim strSQL As String

Set db = CurrentDb
strSQL = "INSERT INTO Daily_Trends_All SELECT Master.* FROM Master WHERE (((Master.filtered)=0) AND ((Master.biz_date)=#" & strDate & "#));"
db.QueryTimeout = 0
db.Execute (strSQL)

Thank you,
nilesh
 
You need to set the QueryTimeout before the the strSQl, so try putting db.QueryTimeout = 6000 (which is equal to 10 minutes) on the next line after Set db = CurrentDB e.g.

Set db = CurrentDB
db.QueryTimeout = 6000

strSQL = "INSERT INTO Daily_Trends_All SELECT Master.* FROM Master WHERE (((Master.filtered)=0) AND ((Master.biz_date)=#" & strDate & "#));"
db.Execute (strSQL)
 
Ihave tried "db.QueryTimeout = 6000" but it times out after 60 seconds
 
I may be wrong but I thought Access records seconds as hundredth's.

So if 6000 = sixty seconds, try adding a couple of noughts 600000

Try and see.

Dave
 
i get overflow error message when i try to use "db.QueryTimeout = 600000"
 
Sorry it didn't work, Ive never used a time-out function.

Perhaps one of the more experienced members can help.

Regards
Dave
 

Users who are viewing this thread

Back
Top Bottom