Result = DatabaseUpdate(#Database, Request$)Description
Executes a query on the given database without returning any records.
#Database The database to use. Request$ The query to execute.
Returns nonzero if the query was successful or zero if it failed (due to a SQL error or a badly-formatted query).
This function is similar to DatabaseQuery() but is independent from the NextDatabaseRow() function. Therefore it's not possible to do a 'SELECT' like request with this function. This function is useful for updating records in the database. In the event of an error, the error text can be retrieved with DatabaseError().
; First, connect to a database with an employee table ; If DatabaseQuery(#Database, "SELECT * FROM employee") ; Get all the records in the 'employee' table While NextDatabaseRow(#Database) ; Loop for each records ; Update the 'checked' field for each records, assuming the 'id' field is ; the first one in the 'employee' table ; DatabaseUpdate(#Database, "UPDATE employee SET checked=1 WHERE id="+GetDatabaseString(#Database, 0)) Wend FinishDatabaseQuery(#Database) EndIf