SQL Update Problem

Results 1 to 2 of 2

Thread: SQL Update Problem

  1. #1
    Neils Guest

    Default SQL Update Problem

    I have a large database of printer information. There is an edit page that allows the user to edit a printer and saves the data using the following SQL statement:<BR><BR>sql = "UPDATE PRINTERTYPES SET PRINTERNAME = &#039" & newprinter & "&#039, SETUP = &#039" & setup & "&#039, SERVERNAME = &#039" & newservers & "&#039, ALTPRINTER = &#039" & altprinter & "&#039 WHERE PRINTERNAME = &#039" & oldprinter & "&#039"<BR><BR>The problem is that I have entries that are identical to each other exept for capitalization. I need it to work that way, but when I edit one record, the one that is similar to it also changes.<BR><BR>How do I avoid this?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Update Problem

    You could add an autonumber field, let&#039s say printer_number to the PRINTERTYPES table and when a user selects a printer to edit change your sql to read &#039update printertypes set ... where printer_number = " & printer_number&#039<BR><BR>This would update only the single row.<BR><BR>

Posting Permissions

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