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



Binds a user-supplied buffer as a parameter to the prepared statement.

sqlany_bind_param ( $stmt, $index, $param )
  • $stmt   A statement object returned by the successful execution of sqlany_prepare.

  • $index   The index of the parameter. The number must be between 0 and sqlany_num_params() - 1.

  • $param   A filled bind object retrieved from sqlany_describe_bind_param.


Returns a scalar value that is 1 when successful or 0 when unsuccessful.

See also
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 )
print "Param name = ", param.get_name(), "\n"
print "Param dir = ", param.get_direction(), "\n"
rc = api.sqlany_bind_param( stmt, 0, param )