|
-
Jun 1st, 2000, 12:25 AM
#1
Thread Starter
New Member
Anyone know how to specify the time-out parameter in connection string?
I am using vb+sql, but I guess this setting should be very general and can be used both in ODBC and OLE.DB?
Thanks,
lupus
-
Jun 1st, 2000, 12:34 AM
#2
New Member
Try This
You don't put the time-out info in the connection string, you specify the time-out as follows:
Dim cn as New ADODB.Connection
cn.ConnectionTimeout = 30 'Default is 15 sec.
cn.ConnectionString = "... 'Put connection string here
Hope this helps!
-
Jun 1st, 2000, 03:26 AM
#3
Thread Starter
New Member
Thanks, it certainly helps.
However, it seems it has no influence on the connection.
Should I actually use "CommandTimeout" setting?
Because my problem is when I run a huge SQL statement after
connected, the server will send back a error message saying
"timeout"..., however "CommandTimeout" has no influence either...
Any idea about it?
lupus
-
Jun 1st, 2000, 05:54 AM
#4
Addicted Member
ConnectionTimeout is the timeout for the connection
CommandTimeout is the timeout for the SQL commands
-
Jun 2nd, 2000, 06:01 AM
#5
Frenzied Member
Do take note there is no ODBC equivalent. You must use ADO if you want/need to set timeout values. It's the main reason I'm converting my ODBC code...
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
|