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_execute

準備文を実行します。

構文
sqlany_execute ( $stmt )
パラメータ
  • $stmt   sqlany_prepare を使用して準備された文。

戻り値

成功した場合はスカラ値 1、失敗した場合は 0 を返します。

備考

sqlany_num_cols を使用して、文が結果セットを返したかどうか確認できます。

参照
stmt = api.sqlany_prepare(conn, "UPDATE Contacts
     SET Contacts.ID = Contacts.ID + 1000
     WHERE Contacts.ID >= ?" )
rc, param = api.sqlany_describe_bind_param( stmt, 0 )
param.set_value(50)
rc = api.sqlany_bind_param( stmt, 0, param )
rc = api.sqlany_execute( stmt )