DBERROR
8.0.4, PLBCMP GUI or PLBLinux Only
The DBERROR instruction obtains error information from the database server. The instruction uses the following format:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
db
Required. A DBFILE or DBSTATEMENT variable defining the database associated with the connection.
errmsg
Required. A Character String Variable that receives the actual error message from the database server.
sqlstate
Required. A Character String Variable that receives the status from the remote database server.
null
Required. A string Character String Variable that is always set to null.
code1
Required. A Numeric Variable that receives the native error value from the database server.
code2
Required. A Numeric Variable that is always set to zero.
Flags Affected: EOS, LESS
Note the following:
This instruction requires a valid database connection. If no connection exists, a D205 error message will occur. Therefore, it can be misleading if this instruction is specified before a successful DBCONNECT.
The LESS flag is set if no error information is available.
The EOS flag is set if there is not enough room in the {errmsg} variable to receive the entire error field.
Under Linux, the {sqlstate} variable is always set to null.
See Also: Example Code, SQL Instructions
![]() |