AcuODBC User's Guide
Version 6.0

5.3.4 UPDATE Command

Use the SQL command UPDATE to modify one or more rows in a table and, depending on the configuration of the DSN, in the Vision data file.


    UPDATE <table-name>   
    SET <field-name> = <literal>    
    [,<field-name> = <literal> [, ...]]    
    [WHERE <condition>]   

This command modifies the specified fields in all rows whose old values satisfy the WHERE condition. The format of the WHERE clause is discussed in section 5.3.1, "SELECT Command." If there is no WHERE clause, all rows are modified.

If the WHERE condition is included, but no rows satisfy the condition, the command does nothing, and it does not report an error.


Enter the following command to change Ellen Smith's city and state to Irvine, California:

    UPDATE clients    
    SET city = 'Irvine', state_province = 'California',    
        post_code = '92612'   
    WHERE owner = 'Ellen Smith'   

The updated table looks similar to this:

Note: You cannot change columns belonging to the primary key.

If a data source is designated as read-only and the data is linked, users cannot update information in the table or in the data file. Read Only is the default setting. To enable users to update rows in the table and records in the data file, clear the Read Only checkbox on the Advanced tab of the AcuODBC Configuration property sheet (or the AcuODBC Server Configuration property sheet if this is a remote DSN).

Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
1988-2003 Acucorp, Inc.
All rights reserved.