MySQL_ErrorCode

4D - Documentation   Français   English   German   4D For MySQL, Command Theme List   4D For MySQL, Command Alphabetical List   Back   Previous   Next

version 2004


MySQL_ErrorCode (connID) Longint

ParameterTypeDescription
connIDLongintConnection ID returned by MySQL_Connect
Function resultLongintError code (where 0 means no error)

Description

The MySQL_ErrorCode command returns the MySQL error code for the last call to MySQL_Select/MySQL_Execute. It returns 0 if the call executed successfully.

connID is a Longint returned from MySQL_Connect.

Example

   MySQL_Execute(connID;"UPDATE clients SET good_one='Yes' WHERE zip_code='90210'")
   $err:=MySQL_ErrorCode(connID)
   If($err#0)
      ALERT("Error # "+String($err))
   End if

4D - Documentation   Français   English   German   4D For MySQL, Command Theme List   4D For MySQL, Command Alphabetical List   Back   Previous   Next