Small company logo:
   History
 
Advertising banner:
 
 Statement.Update
Home • Help • Customization Tools • FCAS • Language Reference • Statement.Update
 
Purpose
Updates the current row in the database. If possible, all changes to the row will be written to the database. The update method is also used to confirm the insertion of a new record.
Syntax
DBStatement.Update
Compliance:
Level 2
Example
The following example runs SQL to return a record, changes some column values, and writes the changes to the database using the positioned Update method.
Sub Main()
        Dim cnct As DBConnection
        Dim stmt As DBStatement
        cnct.OpenConnection("MyDSN")    'Open the data source "MyDSN"
        stmt.OpenStatement(cnct, dbKeyset, dbRowver)
        stmt.ExecuteSQL("SELECT * FROM MyTable WHERE CustNum = 12345")
        stmt.Column("CustName") = "Joe"
        smt.Column("CustAddr") = "101010 Binary Ave."
        stmt.Column("CustLastContact") = Today
        stmt.Update 'Write changes to the database
        stmt.CloseStatement     
        cnct.CloseConnection    'Close the connection
End Sub