|
 |
asp_databases thread: SQL Server Timeout Error
Message #1 by "Chris Boulter" <cboulter@w...> on Thu, 29 Aug 2002 17:16:28
|
|
I am trying to populate a column in a SQL Server table with a list of
randomly generated passwords from an asp page. Some of these will be
mailed conventionally to entrants in our directory, so they can't be
generated one at a time when necessary. I'm unable, however, to update a
single record.
Create recordset code:
Set taPeople = Server.CreateObject("ADODB.Recordset")
taPeople.ActiveConnection = MM_Finance_STRING
taPeople.Source = "taPeople"
taPeople.CursorType = 0
taPeople.CursorLocation = 2
taPeople.LockType = 2
taPeople.Open()
Update code:
While Not taPeople.EOF
taPeople("Password").value = makepassword(8)
taPeople.Update
taPeople.Movenext
Wend
I'm pretty new to this - so apologies if this is something simple. I have
substituted the taPeople("Password") = ... line with a Response.Write to
test that there is something in the recordset, so this works fine, and my
connection string is OK.
Many thanks for your help. Let me know if I've made the obvious mistake
and not supplied enough details.
Chris Boulter
Caritas Data Ltd
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 30 Aug 2002 11:36:01 +1000
|
|
What is the problem? Do you get an error? Does nothing happen? etc?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Chris Boulter" <cboulter@w...>
Subject: [asp_databases] SQL Server Timeout Error
: I am trying to populate a column in a SQL Server table with a list of
: randomly generated passwords from an asp page. Some of these will be
: mailed conventionally to entrants in our directory, so they can't be
: generated one at a time when necessary. I'm unable, however, to update a
: single record.
:
: Create recordset code:
:
: Set taPeople = Server.CreateObject("ADODB.Recordset")
: taPeople.ActiveConnection = MM_Finance_STRING
: taPeople.Source = "taPeople"
: taPeople.CursorType = 0
: taPeople.CursorLocation = 2
: taPeople.LockType = 2
: taPeople.Open()
:
: Update code:
:
: While Not taPeople.EOF
: taPeople("Password").value = makepassword(8)
: taPeople.Update
: taPeople.Movenext
: Wend
:
:
: I'm pretty new to this - so apologies if this is something simple. I have
: substituted the taPeople("Password") = ... line with a Response.Write to
: test that there is something in the recordset, so this works fine, and my
: connection string is OK.
:
: Many thanks for your help. Let me know if I've made the obvious mistake
: and not supplied enough details.
:
: Chris Boulter
: Caritas Data Ltd
Message #3 by "Chris Boulter" <cboulter@w...> on Fri, 30 Aug 2002 11:38:21
|
|
OK - what happens is that it gets to the update part of the code, and then
I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
[Microsoft][ODBC SQL Server Driver]Timeout expired
/wwic/TMP5ivp81nj71.asp, line 32
But I have the right permissions to update this table, because other parts
of my code do it already, using stored procedures that are update ones.
(I can't create an update stored procedure for this, however, because I
just want to step through the recordset one by one and update every record
as I go along with a new random password value.)
Thanks for the help. Hope this makes more sense.
Chris
|
|
 |