Results 1 to 2 of 2

Thread: Timer in vbscript ASP

  1. #1

    Thread Starter
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290

    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?

  2. #2

    Thread Starter
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290
    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
  •  



Click Here to Expand Forum to Full Width