Strange SQL script timeout - Please help!!!!

Results 1 to 2 of 2

Thread: Strange SQL script timeout - Please help!!!!

  1. #1
    Join Date
    Dec 1969

    Default Strange SQL script timeout - Please help!!!!

    I&#039;ve now driven myself insane. I have two tables called phone and fax. One contains phone numbers and extensions and the other contains fax numbers. I have been trying to run a script that will go through all the records and update the phone/fax number. I have two servers with identical dbs I have tried to run this on. <BR>--One db lets me run the script on the phone table but not the fax table <BR>--The other db doesn&#039;t seems to want to run on either table although both dbs are identical.<BR>--On the server where neither script runs the server never times out and on the server where the script runs fine on the phone table I get the following error when running the script on the Fax table.<BR>---------------------------------------------------<BR>Formatting process initiated 1/26/01 8:38:09 AM1<BR><BR>Microsoft OLE DB Provider for SQL Server error &#039;80040e31&#039; <BR><BR>Timeout expired <BR><BR>/query/format_fax.asp, line 44<BR>----------------------------------------------------<BR>Line 44 is the execution of the UPDATE statement.<BR><BR><BR>Here is the code:<BR>---------------------------------------------------<BR>&#060;%@ Language=vbscript %&#062;<BR><BR>&#060;!-- #include virtual="/include/vbfunctions.asp" --&#062;<BR>&#060;%<BR> &#039;******* b3onlineconnect.asp<BR>&#039;Response.Buffer = True<BR><BR>&#039; Open Connection<BR>set dbconn = Server.CreateObject("ADODB.Connection")<BR>dbconn. Open _<BR>"Provider=SQLOLEDB.1;" & _<BR>"Password=" & ThePassword & ";" & _<BR>"Persist Security Info=True;" & _<BR>"User ID=" & TheUserID & ";"& _<BR>"Initial Catalog=" & TheDB & ";" & _<BR>"Data Source=" & TheServer<BR><BR>server.scriptTimeout = 900<BR>response.write "Formatting process initiated " & Now()<BR><BR> set RS3 = Server.CreateObject("ADODB.Recordset")<BR> sqlStr3 = "SELECT * from Fax WHERE<BR> Fax_id &#060;= 10000 order by Fax_id asc"<BR> RS3.Open sqlStr3, b3conn<BR> while not RS3.EOF <BR> pid = RS3("fax_id")<BR> pnum = RS3("fax_number") <BR><BR> newpnum = FormatPhoneNumber(pnum)<BR> <BR> sqlStr = "UPDATE Fax "&_<BR> "SET fax_number= &#039;" & newpnum & "&#039; "&_<BR> "WHERE fax_id = " & pid<BR> b3conn.Execute(sqlStr)<BR> <BR> RS3.MoveNext<BR> wend <BR> response.write "Formatting process complete " & Now()<BR> RS3.Close<BR> set RS3 = nothing<BR> <BR>%&#062;<BR>----------------------------------------------------------- <BR><BR> Any help would be GREATLY appreciated. I have already driven myself nuts with server timeout settings in the script and in IIS and it doesn&#039;t help.<BR><BR>Thanks again,<BR>-DJ

  2. #2
    Join Date
    Dec 1969

    Default RE: Strange SQL script timeout - Please help!!!!

    You said you tried changing the Server.Timeout, have you tried the ConnectionTimeout in your connection object? <BR>Example:<BR>dbConn.ConnectionTimeout = 900<BR><BR>Your problem isn&#039;t with the script timeout, but the connection timeout on the SQL server.<BR><BR>Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts