Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    1

    Unanswered: Updating multiple records

    I have created a (update) form.

    I gathered the data from the database (access) using a loop so the form fields are filled in with the data.

    My code:

    Code:
      <%
       do while not rs.eof
        %>
        <tr> 
          <td width="163" colspan="3"> 
            <div align="right"><%=rs("KEY")%></font> </div>
          </td>
          <td width="130">
            <input type="text" name="<%=rs("ID")%>" value="<%=rs("VALUE")%>" size="30"></font></td>
          <td width="259"><%=rs("COMMENTS")%></font></td>
        </tr>
      <%
       rs.movenext
      loop
     rs.close
    set rs = nothing
    %>
    What i want is updating all the fields in the database like a batch update. I can do it with one record but there are a lot of values so the record become very long.

    Does anybody have an idea?

  2. #2
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    UPDATE [table]
    SET [FieldName] = [Value]
    WHERE [filter]

    http://www.w3schools.com/sql

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

Posting Permissions

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