June 11, 2008 at 8:22 pm
Hi, anyone encounterd timeout expired while running a VB apps on SQL Server 2000. Funny thing is that, only few records got timeout using the same SQL statements.
Please advise if anyone knows.
Thanks.
June 11, 2008 at 8:41 pm
You can increase your command timeout in the application.
dim cmd as sqlcommand
cmd.commandtimeout = 300
Or you can change it in the connection string.
data source=xxxx;initial catalog=xxxx;integrated security=SSPI;Connect Timeout=300;
June 12, 2008 at 2:24 am
Hi, is there a difference between .CommandTimeout and .ConnectionTimeout? Currently the program is set as ConnectTimeout = 30, which means 30seconds right?
Thanks.
June 12, 2008 at 6:23 pm
The connection timeout is how long the app will wait to connect to sql. The command timeout is how long the command will wait for the query results.
June 13, 2008 at 7:47 am
if you want to wait indefinitely, set the commandtimeout = 0
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply