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 » Ruby 用 SQL Anywhere » SQL Anywhere Ruby API

 

sqlany_num_cols

結果セット内のカラム数を返します。

構文
sqlany_num_cols ( $stmt )
パラメータ
  • $stmt   sqlany_execute または sqlany_execute_direct によって実行された文オブジェクト。

戻り値

結果セット内のカラム数のスカラ値を返します。失敗した場合は -1 を返します。

参照
stmt = api.sqlany_execute_direct( conn, "SELECT * FROM Employees" )
# Get number of result set columns
num_cols = api.sqlany_num_cols( stmt )