Why it does not work?

Results 1 to 2 of 2

Thread: Why it does not work?

  1. #1
    Join Date
    Dec 1969

    Default Why it does not work?

    Does anyone know AddNew method works for oracle or not?<BR>I need retrieve the Id number just inserted into the user table and pass it to next page. This is the code in the first page: <BR> set conn=Server.CreateObject("ADODB.Connection")<BR> conn.Open "DSN=user;uid=;pwd="<BR> set rs=Server.CreateObject("ADODB.Recordset")<BR> rs.open "user",conn,2,3<BR> <BR> rs.AddNew<BR> rs("firstname")=firstname<BR> rs("lastname")=lastname<BR> rs("middle")=middle<BR> rs("ssn")=ssn<BR> rs("dob")=dob<BR> rs("street")=street<BR> rs("city")=city<BR> rs("state")=state<BR> rs("zip")=zip<BR> rs("phone")=phone<BR> <BR> rs.update<BR><BR> userid=rs2("userid")<BR> response.redirect "user.asp?lngUserid="&userid<BR> rs.close<BR> conn.close<BR> set rs=nothing<BR> set conn=nothing<BR><BR> The following is the code on the second page use to retrieve the userid<BR><BR> UID=request.querystring("lngUserid")<BR> &#060;td&#062;&#060;input type="hidden" id="user" name="username"<BR> value="&#060;% =UID %&#062;" size="20"&#062;&#060;/td&#062;<BR><BR> Why it doesn’t work? Any clue? Thank you.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Why it does not work?

    try the command obj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts