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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere for Ruby » SQL Anywhere Ruby API

 

sqlany_error

Returns the last error code and message stored in the connection object.

Syntax
sqlany_error ( $conn )
Parameters
  • $conn   A connection object returned from sqlany_new_connection.

Returns

Returns a 2-element array that contains the SQL error code as the first element and an error message string as the second element.

For the error code, positive values are warnings, negative values are errors, and 0 is success.

See also
Example
code, msg = api.sqlany_error( conn )
print "Code=#{code} Message=#{msg}\n"