Database append prob...Need help!

Results 1 to 2 of 2

Thread: Database append prob...Need help!

  1. #1
    Join Date
    Dec 1969

    Default Database append prob...Need help!

    I have created a session in order to allow regestered users to be able to switch between pages while still being recognised, only when I try to add a record to my database from a page that isn&#039;t the main regestration page, my code seems to append a whole new row as opposed to inserting into a specific field. <BR><BR>A list of my code is shown below: <BR><BR><BR>&#060;% Option Explicit %&#062; <BR>&#060;!-- #include virtual="clssfd.asp" --&#062; <BR>&#060;% <BR>If Session("ID") = "" Then <BR>Response.Redirect "Login.asp" <BR>End If <BR>%&#062; <BR><BR>&#060;% <BR>Dim question_array(2), score, i <BR>score = 6 <BR>for i = 1 to 2 <BR>question_array(i)=request.form("question"&i) <BR>next <BR>if question_array(1) &#062; 0.3705 AND question_array(1) &#060; 0.4095 then <BR>score = score+1 <BR>end if <BR>if question_array(2) &#062; 0.81035 AND question_array(2) &#060; 0.89565 then <BR>score = score+1 <BR>end if <BR>%&#062; <BR> &#060;p <BR>&#060;% <BR>Dim rsUsers <BR>Set rsUsers = Server.CreateObject("ADODB.Recordset") <BR>rsUsers.Open "Information", objConn, , adLockOptimistic, adCmdTable <BR>rsUsers.AddNew <BR>rsUsers("Tutorial_3") = (score) <BR>rsUsers.Update <BR><BR>%&#062; <BR>&#060;% <BR>rsUsers.Close <BR>Set rsUsers = Nothing <BR>objConn.Close <BR>Set objConn = Nothing <BR>%&#062; <BR><BR><BR>As shown above i&#039;m trying to append score into tutorial_3 in my "information" database for a given user, only a new row is appended to my database...I am completely stuck & would be most greatful for some advice or ideas regarding the matter. <BR>Thanks Andy.

  2. #2
    Join Date
    Dec 1969

    Default Crossposted RE: Database append prob...Need help!

    Don&#039;t cross post. I just answered this in the database forum.

Posting Permissions

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