all groups > sql server odbc > january 2004 >
You're in the

sql server odbc

group:

Time out error on sql update


Time out error on sql update tmeadows NO[at]SPAM arizonatc.com
1/22/2004 10:49:06 AM
sql server odbc:
I'm creating a DTS package that i can schedule to run everynight.
i'm using activeX vbscript to check expiration date on all the
customers in a database if the they have expired to change them member
circle status. I keep getting a time out error on the first update. I
have no idea why. can some one please help. below is my main function.
if you need any other information to help me please let me know

Thank you.

Function Main()
set myConn = CreateObject("ADODB.Connection")
set myRecordset = CreateObject("ADODB.Recordset")
myConn.Open = "Provider=SQLOLEDB.1;Data Source=(local); _
Initial Catalog=Forté;user id =
'forteDBuser';password='jeep'"

strSelect = "SELECT * FROM Customers"
set myRecordset = myConn.Execute(strSelect)
while not myRecordset.EOF
if not isNull(myRecordSet("CircleExpirationDate")) then
if DateDiff("d", myRecordSet("CircleExpirationDate"), Date) > 366
then
strUpdate = "UPDATE Customers SET MemberCircle = 0 WHERE CustomerId
"_
& " = " & myRecordset.Fields("CustomerId")
myConn.execute(strUpdate)
end if
end if
myRecordset.MoveNext
wend
Main = DTSTaskExecResult_Success
End Function

PS. becasue this is in a test environment no other queries to this
Re: Time out error on sql update jason_woods
6/9/2004 4:42:52 PM

You need to have separte connections to issue a second command


-
jason_wood
-----------------------------------------------------------------------
Posted via http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message92603.htm
AddThis Social Bookmark Button