Database Class Reference


Database class is an implicit instance, it means that you do not need to instantiate it. Database class always represents the frontmost sqlite database opened when the script is executed. Please take a look at the examples section for more details.
Method Description
BeginTransaction Start a new transaction to perform write operations into the sqlite database engine.
Commit Commits an open transaction. This permanently saves changes to the database.
Rollback Cancels an open transaction restoring the database to the state it was in before the transaction began.
SQLSelect Perform the SQL query passed as a parameter. It returns a RecordSet in case of success or nil if an error occurred (details about error can be retrieved using ErrorCode and ErrorMessage methods).
SQLExecute Execute the SQL command passed as a parameter. It returns true in case of success or false if an error occurred (details about error can be retrieved using ErrorCode and ErrorMessage methods).
TableExists Used to check if table name passed as a parameter exists or not. It returns true if table exists or false.
ErrorCode Retrieve latest error code returned from the sqlite database engine.
ErrorMessage Retrieve latest error message returned from the sqlite database engine.