|
-
Feb 15th, 2000, 10:43 AM
#1
Thread Starter
New Member
Is there a way to shorten the timeout, when my prog. tries to exe. a query and it can't communicate with the server. Right now it takes approx. 30 sec.'s. I don't want my prog. to wait that long to alert.
-
Feb 16th, 2000, 01:42 AM
#2
Frenzied Member
Set the QueryTimeout property after you open the database object(s).
-
Feb 17th, 2000, 01:39 AM
#3
Guru
Are you using an ADO COMMAND object to do your queries? What are you using?
-
Feb 17th, 2000, 02:11 AM
#4
Thread Starter
New Member
-
Feb 17th, 2000, 12:48 PM
#5
Hyperactive Member
Could you write a sample syntax?
Thanks
-
Feb 20th, 2000, 07:47 PM
#6
Lively Member
If you are using MS Access d/b: -
myDatabase.querytimeout = 10
or a connection object: -
myConnection.querytimeout = 10
-
Feb 21st, 2000, 01:14 PM
#7
Frenzied Member
Bear in mind, there's a certain amount of time allocated to the network for making the connection _and_ setting the timeout will not alleviate that.
-
Feb 22nd, 2000, 03:58 AM
#8
Frenzied Member
Setting the value, for you, higher shouldn't hurt you. Your LAN users will connect as normal and your WAN users will get a chance to make the connection.
ADO, if you're using it, has two properties you'll want to set (connectiontimeout [defaults to 15 seconds] and commandtimeout [defaults to 30 seconds]). I've got programs using ODBC to connect to SQL Server6.5 that fail using ODBC that no longer do using ADO
simply because I'm able to set, in ADO, the command timeout property. I'm now in the process of converting my ODBC code to ADO (which is a lot easier than one would think).
-
Feb 22nd, 2000, 12:24 PM
#9
Hyperactive Member
My problem is this:
In my LAN all PC's (with my app) access to data well.
We have another PC's in another city (a WAN) that have problems. The recordsets retunrs empty. The speed connection is very slow in this PC's.
Do you really think the querytimeout fix the problem?
Thanks!
-
Feb 23rd, 2000, 02:10 AM
#10
Frenzied Member
Re: ODBC timeout
My problem is this:
In my LAN all PC's (with my app) access to data well.
We have another PC's in another city (a WAN) that have problems. The recordsets retunrs empty. The speed connection is very slow in this PC's.
Do you really think the querytimeout fix the problem?
Thanks!
Oddly enough, my answer comes before your question. I must've been prescient.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|