Once an application is linked to the linked library access library, it can use ODBC API or SA API to establish a local or remote connection directly to the local server. An application can also establish remote connections to other solidDB® servers, including others using the linked library access.
In the ODBC API, to establish a connection to a local server (the server that was linked to the application), the user application calls the SQLConnect function with the literal string “localserver”. You can also specify an empty source name "" for the local server connection. Furthermore, you can also specify a local server name. However, specifying a local server name causes the linked library access to use a “remote” connection, that is, to go through the network rather than to use the direct function calls to the linked library access library.
The following ODBC API code examples connect directly to a local solidDB® server with username dba and password dba:
In the SA API, to establish a connection, the user application calls the SaConnect function with the literal string “localserver” (not the server name). You can also specify an empty source name "" for the local server connection. Furthermore, you can also specify a local server name. However, specifying a local server name causes the linked library access to use a “remote” connection, that is, to go through the network rather than to use the direct function calls to the linked library access library.
The following SA API example code connects directly to a solidDB® server with username dba and password dba: