What is in the MakePassword() function?
Something odd is up - it doesn't look like a permissions problem, because
you'd be getting a different error message, but on the other hand a single
update shouldn't generate a timeout.
That said, I don't think the way you are doing it (using a cursor) is a
great idea - instead we should look to put the MakePassword() function into
your DB, then do something like:
UPDATE
Users
SET
UserPassword = MakeRandomPassword(...)
and you can update all the records in one go, rather than one at a time
using a cursor.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Chris Boulter" <cboulter@w...>
Subject: [asp_databases] Re: SQL Server Timeout Error
: 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.