SMA and LLA Guide : Creating and running SMA applications : Creating SMA applications - overview : Establishing local connections for SMA
  
Establishing local connections for SMA
For SMA use, the application needs to establish a local SMA connection with the SMA server. The connection type is defined with a SMA-specific connect string.
For SMA, the connection request is sent over the network connection (handshake connection) using any locally available protocol (tcpip, named pipes, unix pipes). During the connect handshake, the shared-memory segment handle is passed to the driver so that it can access the server’s shared memory.
The connect string syntax for a SMA connection is:
sma <protocol name> <port number or pipe name>
For example:
sma tcp 2315
If an SMA connect request is made to the server that is not an SMA Server, a connect error is returned.
Important: A single application can connect to only one SMA server. However, the SMA application may make regular network-based connections to any local or remote server.
ODBC API
When using the ODBC API, define the SMA-specific connect string in the SQLConnect function call.
Examples
The following ODBC API code examples connect directly to the local SMA solidDB® server with username dba and password dba:
rc = SQLConnect(hdbc, "sma tcp 1315", (SWORD)SQL_NTS, "dba", 3, "dba", 3);
or
rc = SQLConnect(hdbc, "sma upipe SOLID", (SWORD)SQL_NTS, "dba", 3, "dba", 3);
SA API
When using the SA API, define the SMA-specific connect string in the SaConnect function call.
The following code examples connect directly to the local SMA solidDB® server with username dba and password dba:
SaConnectT* sc = SaConnect("sma tcp 1315", "dba", "dba");
or
SaConnectT* sc = SaConnect("sma upipe SOLID", "dba", "dba");
Driver manager
When using a Driver manager, define the SMA-specific connect string in the SMA Data Source.
See also
Creating SMA applications - overview