Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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 callSet 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
- FM.ExecuteSQL.LastSQL
- FM.InsertRecordQuery
- FM.InsertRecordQueryIgnoreDuplicates
- FM.SQL.Execute
- FM.SQL.InsertRecords
- JSON.Import.Work
- Matrix.InsertRecords
- SQL.Execute
- SQL.InsertOrUpdateRecords
- XML.Import
Example Databases
Blog Entries
- Storing data in the FileMaker schema
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- ExecuteSQL and getting error details
- MBS Filemaker Plugin, version 4.2pr5
- MBS Filemaker Plugin, version 3.2pr2
FileMaker Magazin
This function is free to use.
Created 18th August 2014, last changed 14th September 2015