Hi,
I'm new to the forum. Hope I'm starting this in the right place.
I have the infamous timeout error accessing a sql server 2000 d
through asp pages on iis. I read the other post concerning this issu
and added the recommendations to my code. Problem is, no resolutio
for me.
I have a dynamically generated update statement which has a rathe
large IN clause making comparisions on an indexed and keyed intege
field. Here's the code below:
If Request("Submit").Count > 0 Then
Server.ScriptTimeout = 600
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionTimeout = 600
cn.open CONN_STRING
Set editCmd = Server.CreateObject("ADODB.Command")
editCmd.ActiveConnection = cn
editCmd.commandtimeout = 600
'This part dynamically generated translates to....
editCmd.CommandText = "UPDATE Inspections SET Mailgrou
= '10774, 10773, 10771, 10766, 10764, 10763, 10767, 10770, 10769
10772, 10768, 10765, 10762, 10759, 10758, 10757, 10761, 10760, 10750
10748, 10755, 10751, 10753, 10752, 10749, 10754, 10756, 10745, 10741
10743', LetterNo = 'asdf', InspComment = 'asdf', Reviewed = 1 WHER
Record_ID in (10774, 10773, 10771, 10766, 10764, 10763, 10767, 10770
10769, 10772, 10768, 10765, 10762, 10759, 10758, 10757, 10761, 10760
10750, 10748, 10755, 10751, 10753, 10752, 10749, 10754, 10756, 10745
10741, 10743)"
editCmd.Execute
End If
The strange thing is that if less values are in the IN clause, th
statement executes quickly and successfully.
I also thought to put this statement in a loop for each of the I
clause values to see if that helped. Nope. It executes about 1
iterances then timesout.
Any suggestions greatly appreciated.
S
-
swransk
-----------------------------------------------------------------------
Posted via
http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread:
http://www.webservertalk.com/message172903.htm