Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere PHP API » SQL Anywhere PHP API reference



int sasql_errorcode( [ sasql_conn $conn ] )

Returns the error code of the most-recently executed SQL Anywhere PHP function. Error codes are stored per connection. If no $conn is specified, then sasql_errorcode returns the last error code where no connection was available. For example, if you are calling sasql_connect and the connection fails, then call sasql_errorcode with no parameter for the $conn to get the error code. If you want to get the corresponding error message use the sasql_error function.


$conn   The connection resource returned by a connect function.


An integer representing a SQL Anywhere error code. An error code of 0 means success. A positive error code indicates success with warnings. A negative error code indicates failure. For a list of error codes, see SQL Anywhere error messages sorted by SQLCODE.

Related functions