DatabaseQuery()
Syntax
Result = DatabaseQuery(Request$)Description
Executes the SQL Request$ on the current database. If the 'Result' is 0, then the query can't be executed correcty (SQL fault, bad formatted query, etc.. The error text can be retreived with DatabaseError()), else the query has succeded and NextDatabaseRow() can be used to list the returned records. This command always affect NextDatabaseRow() even if the request doesn't return any record. DatabaseUpdate() should be used to execute a request which doesn't returns any record.
Example; First, connect to a database with an employee table ; If DatabaseQuery("SELECT * FROM employee") ; Get all the records in the 'employee' table While NextDatabaseRow() ; Loop for each records Debug GetDatabaseString(0) ; Display the content of the first field Wend EndIf
Supported OS
Windows, Linux, MacOS X