|
-
May 1st, 2002, 01:57 PM
#1
Thread Starter
Hyperactive Member
Timer in vbscript ASP
I have an ASP page for editing a recordset.
A function AddUser is in the page. The AddUser function opens a recordset, adds a new record, updates the recordset, and closes.
The edit function checks to see if a new id is coming in, if not the AddUser function is called and returns the new id.
Everything is fine at this point.
At the next step, I open a new recordset using the new id value.
This recordset does not return a record because (it appears) the new record hasn't gotten in yet. If I refresh, then it is there. It seems like a need a timer or a delay between adding the new user, and retrieving the recordset. Or is there a better way to do this?
-
May 1st, 2002, 02:04 PM
#2
Thread Starter
Hyperactive Member
Okay this works...but it seems like a stupid way to go about it....
Code:
Do Until dblcheck <> ""
Set RS = Server.CreateObject("ADODB.Recordset")
sSQL = "SELECT * FROM BSWWebUsers WHERE UserId=" & CheckUser
RS.Open sSQL, sCnn, 2,2
If Not RS.EOF Then
dblcheck = RS("UserId")
Else
RS.Close
Set RS = Nothing
End If
Loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|