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



Describes the bind parameters of a prepared statement.

sqlany_describe_bind_param ( $stmt, $index )
  • $stmt   A statement prepared successfully using sqlany_prepare.

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


Returns a 2-element array that contains 1 on success or 0 on failure as the first element and a described parameter as the second element.


This function allows the caller to determine information about prepared statement parameters. The type of prepared statement (stored procedure or a DML), determines the amount of information provided. The direction of the parameters (input, output, or input-output) are always provided.

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 )