Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
使用指定的连接对象和连接字符串创建与某个 SQL Anywhere 数据库服务器的连接。
sqlany_connect ( $conn, $str )
$conn 由 sqlany_new_connection 创建的连接对象。
$str 一个 SQL Anywhere 连接字符串。
返回标量值,成功建立连接为 1,连接失败则为 0。使用 sqlany_error 检索错误代码和消息。
# 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"