Got a Problem with Recordset and Update

Results 1 to 2 of 2

Thread: Got a Problem with Recordset and Update

  1. #1
    Join Date
    Dec 1969

    Default Got a Problem with Recordset and Update

    I have this code:<BR>Dim iRecordToUpdate<BR>Dim I<BR>Dim objRecordset <BR><BR>Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR><BR>objR ecordset.Open "Info", my_conn<BR><BR>objRecordset.CacheSize = 15 <BR><BR>iRecordToUpdate = Request.QueryString("id")<BR><BR>If iRecordToUpdate &#060;&#062; 0 Then <BR>If objRecordset.EOF Then <BR>objRecordset.MoveFirst <BR>Do Until objRecordset.Fields("ID_num") = iRecordToUpdate <BR>objRecordset.MoveNext <BR>Loop <BR><BR>objRecordset.Fields("Info.I_name") = CStr("" & Request.Form("name") & "")<BR>objRecordset.Fields("Info.I_subject") = CStr("" & Request.Form("subject") & "")<BR>objRecordset.Fields("Info.I_message") = CStr("" & Request.Form("message") & "")<BR>objRecordset.Fields("Info.I_email") = CStr("" & Request.Form("email") & "")<BR><BR>objRecordset.Update<BR><BR>End If <BR>End If<BR><BR> Response.Write "&#060;p align=center&#062;&#060;font face=&#039veranda, arial, helvetica&#039 size=3&#062;Update Done" <BR><BR><BR> my_Conn.close<BR> set my_Conn = nothing<BR>and I opened the connection up farther. so its not that. but when I use it it says Update Done but none of the information actually goes to the database. I don&#039t know what the problem is. if you could help I would appreciate it.

  2. #2
    Tony Guest

    Default RE: Got a Problem with Recordset and Update

    I think your problem lies in your loop statement. You need to include the responses inside the loop statement.

Posting Permissions

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