Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

FM.ExecuteSQL.LastError

Queries the last error code from an SQL call

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
FM FMSQL 1.2 Yes Yes Yes Yes Yes

MBS( "FM.ExecuteSQL.LastError" )

Parameters

none

Description

Queries the last error code from an SQL call
Set by FM.InsertRecord, FM.SQL.Execute, FM.ExecuteSQL, FM.ExecuteFileSQL or FM.ExecuteSQLOnIdle.
The Errors number s are the same ones as the ones retuned by Native FileMaker function "Get(LastError)" Examples: 1200 - Generic Calculation Error" 200 - "Access Denied" 106 - "Missing Table" Known Limitations: Record Locking Errors are Not Reported! This means you must exercise caution when using UPDATE. There is no way to determine if an update actually occurs unless you check the value again after the update occured.
In general error 8309 is a semantic error, so something is wrong in your SQL. 8310 is a syntax error, something in the SQL is not correctly parsed.
Error 8309 means you did pass wrong data type, like string for a number.
See also FM.ExecuteSQL.LastErrorMessage.

Examples

Get Last SQL Error

MBS( "FM.ExecuteSQL.LastError")

See also

Example Databases


FM.ExecuteSQL   -   FM.ExecuteSQL.LastErrorMessage

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins