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

 

sqlany_execute

Executes a prepared statement.

Syntax
sqlany_execute ( $stmt )
Parameters
  • $stmt   A statement prepared successfully using sqlany_prepare.

Returns

Returns a scalar value that is 1 on success or 0 on failure.

Remarks

You can use sqlany_num_cols to verify if the statement returned a result set.

See also
Example
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 )