Database>Updating or Modifying Field(s) in a Record
Introduction Installation Beginning Admin Quick Ref FTP Server SMTP Server Database Security
Statements Objects String Parsing Events Queues Samples Special names Error Handling Accessories   Back
Caravan Business Server>Help>Database>Updating or Modifying Field(s) in a Record
Syntax <caravan> connection object(modify)</caravan>
Text To change data in your database, you must first make the record you want to edit, the current record. The current record number may be passed from a form or may be a constant. After the changes are made, update the record using the modify statement.
Sample
      Form field
      <caravan>
      table contacts = contacts. contacts
      testconn(recordno)=form(recno)
      // form(recno) is a record number passed from the previous page to the current web page through a submit action.
      contacts (firstname)="Jane"
      contacts (modify)
      </caravan>
      
      Conditional
      <caravan>
           table contacts = contacts.contacts
           select from contacts where company=1 and firstname=jone and lastname=minolta
           contacts(firstname)="Jane"
           contacts(modify)
      </caravan>
      
      Constants
      <caravan>
      table contacts = contacts.contacts
      contacts (recordno)="3"
      // go to record number 3
      contacts (firstname)="Tom"
      contacts (modify)
      </caravan>

Quick Reference
Home       Back