/ comp / gb.db / connection / edit
Connection.Edit (gb.db)
Syntax

    FUNCTION Edit ( Table AS String [ , Request AS String, Arguments AS , ... ] ) AS Result

Returns a read/write Result object used for editing records in the specified table.

- Table is the table name.
- Request is a SQL WHERE clause used for filtering the table.
- Arguments are quoted as needed by the SQL syntax, and substituted inside the Request string

The last feature allows you to write requests that are independant of the underlying database type.

### Examples

    DIM hResult AS Result
    DIM sCriteria AS String
    DIM iParemeter AS Integer

    ' Same as Select * from tblDEFAULT where id = [parameter value]
    sCriteria = "id = &1"
    iParameter = 1012

    $hConn.Begin

    hResult = $hConn.Edit("tblDEFAULT", sCriteria, iParameter)
    ' Set field value
    hResult!Name = "Mr Smith"

    ' Update the value
    hResult.Update
    $hConn.Commit

### See also

Delete Find Exec Subst