📄 connection_connect.html
字号:
database on a local server.
<LI> <STRONG><database name> or @ <STRONG><database name> </STRONG> </STRONG>- connects to a database with the
specified name on your local server.
<LI> <STRONG>
<server name>@ </STRONG>- connects to a
default database on the specified server.
<LI> <STRONG>
<server name>@<database name> </STRONG>- connects to a
database with the specified name on the specified
server.</LI></UL>
<P>To connect to a named instance of SQL Server 2000 use
<STRONG><server name\instance name></STRONG>
instead of <STRONG><server name></STRONG>.</P>
<P>If <EM>sUserID</EM> parameter is
empty, SQLAPI++ Library requests a secure, or trusted, connection to
SQL Server.</P>
<P><STRONG>Using OLE
DB</STRONG><BR>Starting from version 3.3.1 SQLAPI++
Library uses <U>OLE DB as the
default API</U>
when working with SQL Server. The
SQLAPI++ Library requires SQL Server OLE
DB version 2.5 or higher.</P>
<P><STRONG>Using
DB-Library</STRONG><BR>Starting from version 3.3.1
SQLAPI++ Library uses <U>OLE DB as
the default API</U> when working with SQL Server. If you
want to use DB-Library, you should set "<STRONG
>UseAPI</STRONG>" <A href="Connection_setOption.html" >connection
option</A> before specifying SQL Server client or
connecting to database. The SQLAPI++ Library requires
DB-Library version 6.x or higher.</P>
</td>
</tr>
<TR>
<TD><STRONG><A
href="../ServerSpecific/Sybase.html" title="Sybase server specific information">Sybase</A></STRONG>
<TD style="LEFT: 84px; TOP: -1px">
<P><EM>sDBString</EM> - one of the
following formats:</P>
<UL>
<LI><STRONG><STRONG>""
or "@"</STRONG></STRONG> - empty string or
'@' character, connects to a default database on a
default server.
<LI> <STRONG><database name> or @ <STRONG><database name> </STRONG> </STRONG>- connects to a database with the
specified name on your default server.
<LI> <STRONG>
</STRONG> <STRONG>
<server name>@ </STRONG>- connects to a
default database on the specified server.
<LI> <STRONG>
<server name>@<database name> </STRONG>- connects to a
database with the specified name on the specified
server.</LI></UL>
<P>The SQLAPI++ Library requires Open
Client version 10.0 or higher.</P></TD>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/DB2.html" title="DB2 server specific information">DB2</A></STRONG> </p>
</td>
<td>
<P><EM>sDBString</EM> - any valid DB2
connection string.</P>
<P>The SQLAPI++ Library requires DB2
CLI version 6.x or higher.</P>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/Informix.html" title="Informix server specific information">Informix</A></STRONG>
</p>
</td>
<td>
<P><EM>sDBString</EM> - any valid Informix
connection string.</P>
<P>The SQLAPI++ Library requires Informix
CLI version 2.x or higher.</P>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/InterBase.html" title="InterBase server specific information">InterBase</A></STRONG></p>
</td>
<td>
<P><EM>sDBString:</EM></P>
<UL>
<LI>For local InterBase
databases, this can be a file name.
<LI>To connect to an InterBase database on a remote
server using TCP/IP the syntax is<SERVER_NAME>
<STRONG> <server
name>:<filename></STRONG><FILENAME>.
<LI>To connect to an InterBase database on a remote
server using NetBEUI, the syntax is
\\<STRONG> <server
name>\<filename></STRONG>.
<LI>To connect to an InterBase database on a remote
server using SPX, the syntax is <STRONG>
<server name>@<filename>.</STRONG></LI></UL>
<P>The SQLAPI++ Library requires
client API version 5.x or higher.</P>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/SQLBase.html" title="SQLBase server specific information">SQLBase</A></STRONG></p>
</td>
<td>
<p><EM>sDBString</EM> - the database name as it is
specified in SQL.INI file.</p>
<p>The SQLAPI++ Library requires
CAPI version 6.x or higher.</p>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/MySQL.html" title="MySQL server specific information">MySQL</A></STRONG></p>
</td>
<td>
<p><EM>sDBString</EM> - One of the following formats:</p>
<UL>
<LI><STRONG>"" or "@"</STRONG> - empty
string or '@' character, connects to a local server.
<LI><STRONG><database name> or @ <STRONG><database name></STRONG></STRONG>-
connects to a database with the specified name on
local server.
<LI><STRONG><server name>@</STRONG>- connects to the
specified server.
<LI><STRONG><server name>@<database name>
</STRONG>- connects to a database with the specified
name on the specified server.</LI></UL>
<p><STRONG><server
name></STRONG> in its turn
can have the following formats:</p>
<UL>
<LI>hostname[:port]
<LI>pathname of the Unix socket that is used to
connect to the server </LI></UL>
<p>The SQLAPI++ Library requires MySQL C
API version 3.23.x or higher.</p>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/PostgreSQL.html" title="PostgreSQL server specific information">PostgreSQL</A></STRONG></p>
</td>
<td>
<p><EM>sDBString</EM> - One of the following formats:</p>
<UL>
<LI><STRONG>"" or "@"</STRONG> - empty
string or '@' character, connects to a local server.
<LI><STRONG><database name> or @ <STRONG><database name></STRONG></STRONG>-
connects to a database with the specified name on
local server.
<LI><STRONG><server name>@</STRONG>- connects to the
specified server.
<LI><STRONG><server name>@<database name>
</STRONG>- connects to a database with the specified
name on the specified server.</LI></UL>
<p> The SQLAPI++ Library requires
libpq version 7.1.x or higher.</p>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
href="../ServerSpecific/ODBC.html" title="ODBC server specific information">ODBC</A></STRONG></p>
</td>
<td>
<p><EM>sDBString</EM> - any valid ODBC connection string.</p>
<p>The SQLAPI++ Library requires
ODBC version 3.x or higher.</p>
</td>
</tr>
</table>
<h3>See also</h3>
<p><A
href="Connection_isConnected.html"
>isConnected</A>, <A
href="Connection_Disconnect.html">Disconnect</A>,
<A
href="Connection_setClient.html">setClient</A>, <A
href="Connection_setOption.html">setOption</A>
</p>
<p><A
href="Enums.html">SAClient_t</A>
</p>
<p><A href="../HowTo/errors.html" >Error handling</A> </p>
<h3>Problems and Questions</h3>
<p>
If
you haven't found the answer to your questions or
have some problems on using the Library, please, send e-mail to <A href="mailto:howto@sqlapi.com">howto@sqlapi.com</A>.
</p>
</td>
<tr></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -