sqlany_connect

Creates a connection to a SQL Anywhere database server using the specified connection object and connection string.

Syntax
sqlany_connect ( $conn, $str )
Parameters
  • $conn   The connection object created by sqlany_new_connection.

  • $str   A SQL Anywhere connection string.

Returns

Returns a scalar value that is 1 if the connection is established successfully or 0 when the connection fails. Use sqlany_error to retrieve the error code and message.

See also
Example
# Create a connection
conn = api.sqlany_new_connection()

# Establish a connection
status = api.sqlany_connect( conn, "UID=DBA;PWD=sql" )
print "Connection status = #{status}\n"