DatabaseError()

Syntax

Error$ = DatabaseError()
Description
Returns a description of the last database error in text format. This is especially useful with the following functions: OpenDatabase(), DatabaseQuery() and DatabaseUpdate().

Parameters

None.

Return value

Returns the error description.

Example

  ; First, connect to a database with an employee table
  ;
  If DatabaseQuery(#Database, "SELECT * FROM employee") ; Get all the records in the 'employee' table
    ; ...
    FinishDatabaseQuery(#Database)
  Else
    MessageRequester("Error", "Can't execute the query: "+DatabaseError())
  EndIf

See Also

DatabaseQuery(), DatabaseUpdate()

Supported OS

All

<- DatabaseDriverName() - Database Index - DatabaseID() ->