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

SQL Anywhere 12.0.1 » UltraLite - C 及 C++ 编程 » 应用程序开发 » UltraLite C++ 应用程序开发

 

关闭 UltraLite 数据库连接

不再使用数据库时将资源释放出去非常重要;否则,只要应用程序存在与数据库的连接,UltraLite 数据库文件就仍在使用。

 ♦ 关闭 UltraLite 数据库连接
  1. 调用释放资源的 Close 方法。

    当应用程序不再需要与数据库的连接时,使用以下代码:

    if( conn != NULL ) {
        conn->Close( &ulerr );
    }
  2. 调用 Fini 方法以结束 ULDatabaseManager 对象。

    当关闭应用程序时使用以下代码:

    ULDatabaseManager.Fini();
 另请参见