Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
FM.ExecuteSQL.LastError
Queries the last error code from an SQL call
Component |
Version |
macOS |
Windows |
Linux |
Server |
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
Blog Entries
FileMaker Magazin
Created 18th August 2014, last changed 14th September 2015
FM.ExecuteSQL
-
FM.ExecuteSQL.LastErrorMessage
Feedback: Report problem or ask question.