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 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere for Ruby » SQL Anywhere Ruby API

 

sqlany_error

返回存储在连接对象中的上一错误代码和消息。

语法
sqlany_error ( $conn )
参数
  • $conn   从 sqlany_new_connection 返回的连接对象。

返回值

返回 2 个元素的数组,其中第一个参数表示 SQL 错误代码,第二个参数表示错误消息字符串。

对于错误代码,正值表示警告,负值表示错误,0 表示成功执行。

另请参见
示例
code, msg = api.sqlany_error( conn )
print "Code=#{code} Message=#{msg}\n"