Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - M-Business Anywhere 编程 » UltraLite for M-Business Anywhere API 参考 » DatabaseManager 类

 

openConnection 方法

打开与 parms 指定的数据库的连接。

语法
Connection openConnection( String parms)
参数
  • parms   保存用于打开连接的参数、形式为一组 "关键字=值" 对的字符串。参数关键字不区分大小写,而大多数值是区分大小写的。

返回值

一个打开的连接。

注释

如果该数据库不存在,则抛出错误。您可以在错误捕获代码中检查 Connection.sqlCode 以便标识错误的原因。

在某一给定时间,只能有一个数据库处于活动状态。在其它连接处于打开状态时尝试打开与另一数据库的连接会导致出错。