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 embedded SQL » Library function reference

 

db_string_disconnect function

Prototype
unsigned int db_string_disconnect(
    SQLCA * sqlca, 
    char * parms );
Arguments
  • sqlca   A pointer to a SQLCA structure. For information, see The SQL Communication Area (SQLCA).

  • parms   A null-terminated string containing a semicolon-delimited list of parameter settings, each of the form KEYWORD=value. For example:
    "UID=DBA;PWD=sql;DBF=c:\\db\\mydatabase.db"

    For a list of connection parameters, see Connection parameters.

Description

This function disconnects the connection identified by the ConnectionName parameter. All other parameters are ignored.

If no ConnectionName parameter is specified in the string, the unnamed connection is disconnected. This is equivalent to the embedded SQL DISCONNECT statement. The return value is TRUE if a connection was successfully ended. Error information is returned in the SQLCA.

This function shuts down the database if it was started with the AutoStop=yes parameter and there are no other connections to the database. It also stops the server if it was started with the AutoStop=yes parameter and there are no other databases running.