KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Handling SQL errors in 4D code
PRODUCT: 4D Developer | VERSION: 11 | PLATFORM: Win
Published On: January 23, 2008

There is a command available for use in an error handling method that displays the SQL error code, internal component code as well as descriptive text for any SQL errors encountered.

The command is GET LAST SQL ERROR. First, install the error handler with ON ERR CALL, then use this command as described in the documentation.

Commented by Silvio Belini on March 30, 2009 at 11:58 AM
Starting in 4D v11.3 SQL, the GET LAST SQL ERROR command does not exist and has been replaced by the GET LAST ERROR STACK command.

Please refer to http://kb.4d.com/search/assetid=75203