|
|
|
|
Sql Command Timeout
Hello,
I've got a SQL query that times out on my SQL 2000 DB. I used query analyzer
and it works great it took 57seconds to complete. I run it in VB6 and it
times out. I set the connection timeout to 0 but to no avail it craps out at
30 Seconds. Is there a command timeout? Would this solve my problem. I'm
attaching my vb code below.
My query is large but I can't trim it down any so I'm hoping there is a way
around this. Thanks
strConnectionString = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=XXXX;password=XXXX;initial catalog=MasterDATA;Data
Source=drs"
Set masterCNN = CreateObject("ADODB.Connection")
masterCNN.ConnectionTimeout = 0
masterCNN.Mode = adModeReadWrite
masterCNN.Open strConnectionString
Set masterRST = CreateObject("ADODB.Recordset")
masterRST.CursorLocation = adUseClient 'works with rs.find method
masterRST.LockType = adLockOptimistic
masterRST.CommandTimeout = 0
masterRST.Open sql, masterCNN
--
Rob
IT guy!
Tue, 11 Jan 2005 10:53:01 -0800
=?Utf-8?B?Um9i?=
|
|