solidDB Help : Programming : Deploying SMA and LLA applications : Deploying LLA applications : Starting and stopping the LLA server : Implicitly starting and stopping an LLA server with ODBC API function calls
  
Implicitly starting and stopping an LLA server with ODBC API function calls
The ODBC API can be used to start and shut down the LLA server implicitly.
When the LLA server is started implicitly by the application, the server automatically opens the database that is in the working directory. The server does not create a database during an implicit startup; if a database file is not found, the server returns an error.
To create a database, you must use an explicit startup function, such as SSCStartServer with the appropriate parameters, see Explicitly starting and stopping an LLA server with SSC API calls, or create a database as for a standard server, see Creating a new database.
When function SQLConnect is called for the first time, the server is implicitly started. The server is shut down implicitly when the user application calls function SQLDisconnect, which is the last open local connection.
Note The server shuts down regardless of currently existing remote connections.
The following example demonstrates the use of the SQLConnect and SQLDisconnect API calls to start and stop the server:
/* Connection #1 */
rc = SQLConnect (hdbc1, "", SQL_NTS, "dba", SQL_NTS, "dba",
SQL_NTS); //Server Started Here
... odbc calls
/* Disconnect #1 */
SQLDisconnect (hdbc1); //Server Shut Down Here
/* Connection #2 */
rc = SQLConnect (hdbc2, "", SQL_NTS, "dba", SQL_NTS, "dba",
SQL_NTS); //Server Started Here
... odbc calls
/* Disconnect #2 * /
SQLDisconnect (hdbc2); //Server Shut Down Here
or
/* Connection #1*/
rc = SQLConnect (hdbc1, "", SQL_NTS, "dba",
SQL_NTS, "dba", SQL_NTS); // Server Started Here
/* Connection #2*/
rc = SQLConnect (hdbc2, "", SQL_NTS, "dba", SQL_NTS, "dba", SQL_NTS);
... odbc calls
/* Disconnect #1 */
SQLDisconnect (hdbc1);
/* Disconnect #2 * /
SQLDisconnect (hdbc2); // Server Shut Down Here
Go up to
Starting and stopping the LLA server