⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connection_setclient.html

📁 通用的数据库中间库
💻 HTML
字号:
<html><head><meta name="KEYWORDS" content="      library, C++,       Oracle, SQLServer, DB2, Sybase, Informix, InterBase, SQLBase, ODBC, 
      SQL, server, client, database, programming, development, software, 
      Win32, Windows, Linux, Unix, Solaris,
      Microsoft, Borland, Centura, Gupta, IBM"><meta name="DESCRIPTION" content=
"SQLAPI++ is C++ library for accessing SQL databases (Oracle, SQLServer, Sybase, DB2, InterBase, SQLBase, Informix, ODBC).
It uses native APIs, provides low-level access to database-specific features."><title>SQLAPI++ Library - Online Documentation - SAConnection::setClient</title></head><body bgcolor="#ffffff" BACKGROUND="../images/bg.gif" text="#000000"><!--GlbHdr--> <table WIDTH="600" height="40" frame="hsides" BORDER="2" BORDERCOLOR="#004fcd" align="right" cellpadding="0" cellspacing="2" id="TABLE1">
    
    <tr><!--class="GlbDefault"-->        
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="../index.html" style="TEXT-DECORATION: none">
			<font color="white" size="3" face="sans-serif">
			<b>Home</b></font></A></td></TD>
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="../HowTo/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>How To</b></font></A></td><!--class="GlbActive"-->
        <td width="70" bgcolor="#00bb00" bordercolor="black" align="middle"><A href="../OnLineDoc/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Online Documentation</b></font></A></td><!--class="GlbDefault"-->        
		<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="../Support/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Support</b></font></A></td>
        <td width=70 bgcolor=#000094 bordercolor=black align=middle>
			<A href="../Download/index.html" style="TEXT-DECORATION: none" >
			<font color=white size=3  
            face=sans-serif>
			<b>Download</b></font></A></td>
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="../Order/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Order</b></font></A></td>    </tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="100%">
	<tr>
		<td valign="top" width="165"><!--LeftMenu-->			
			<table frame="void" CELLSPACING="5" width="165">
				<tr><td><p>&nbsp;</p></td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="Command.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SACommand</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/red.gif" WIDTH="12" HEIGHT="12">
					<A href="Connection.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAConnection</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="Exception.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAException</font></A> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="Field.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAField</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="Param.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAParam</A> </FONT> </td>
				</tr>
				<tr><td><hr></td></tr>
				<tr>
					<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="String.html" style ="TEXT-DECORATION: none" >
					<font color=white size=2 face=sans-serif>
					SAString</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="DateTime.html" style ="TEXT-DECORATION: none" >
					<font color=white size=2 face=sans-serif>
					SADateTime</A> </FONT> </td>
				</tr>
			</table>
		</td><!--empty column-->
		<td width="20"> 
			<p>&nbsp;&nbsp;</p>
		</td><!--Content-->
		<td valign="top" align="left">
			<table width="100%" cellspacing="2" cellpadding="2">
				<tr>
					<td align="left">
						<A href="Connection_Usage.html" style="TEXT-DECORATION: none"><h3>Usage</h3></A>
					</td>
					<td align="left">
						<A href="Connection.html" style="TEXT-DECORATION: none"><h3>Class Members</h3></A>
					</td>
					<td align="left">
						<A href="Connection_Examples.html#setClient" style="TEXT-DECORATION: none"><h3>Examples</h3></A>
					</td>
				</tr>			
				<tr>
					<td colspan="3"><h1>SAConnection::setClient</h1></td>
				</tr>			
			</table>

			<p><font face="Arial"><b>  void setClient( SAClient_t</b> 
			eSAClient<b> );<BR>throw (SAException);</b></font></p>

			<p> 
              Assigns an DBMS client for the 
              connection. 
			</p>

			<h3>Parameters</h3>
            <P><EM>eSAClient.</EM>&nbsp;&nbsp;&nbsp; One of the following values 
            from <STRONG>SAClient_t</STRONG> enum:</P>
            <UL><STRONG>
                <LI><STRONG>SA_Oracle_Client</STRONG></STRONG>&nbsp;&nbsp;&nbsp; Oracle 
                client.<STRONG> 
                <LI><STRONG>SA_SQLServer_Client</STRONG></STRONG>&nbsp;&nbsp;&nbsp; SQL 
                Server client.<STRONG> 
                <LI><STRONG>SA_InterBase_Client</STRONG></STRONG>&nbsp;&nbsp;&nbsp; 
                InterBase client.<STRONG> 
                <LI><STRONG>SA_SQLBase_Client</STRONG></STRONG>&nbsp;&nbsp;&nbsp; 
                SQLBase client.<STRONG> 
                <LI>SA_ODBC_Client</STRONG>&nbsp;&nbsp;&nbsp; ODBC client. 
                <LI><STRONG>SA_DB2_Client</STRONG>&nbsp;&nbsp;&nbsp; DB2 client. 
                <LI><STRONG>SA_Informix_Client</STRONG>&nbsp;&nbsp;&nbsp; Informix client. 
                <LI><STRONG>SA_Sybase_Client</STRONG>&nbsp;&nbsp;&nbsp; Sybase client. 
                
                <LI><STRONG>SA_MySQL_Client</STRONG>&nbsp;&nbsp;&nbsp; MySQL client. 
                
                <LI><STRONG>SA_PostgreSQL_Client</STRONG>&nbsp;&nbsp;&nbsp; PostgreSQL client.&nbsp;</LI>    
            </UL>

			<h3>Remarks</h3>
			<p>
                       
              You can set a client in <A 
            href="Connection_Connect.html">Connect</A> 
            method, in this case you don't need to use 
            <STRONG>setClient</STRONG>
            method. The main destination of this 
            method is to connect to a server with no connection to a database 
            (for example, to check a client availability and version). But if 
            you are calling <A 
            href="Connection_Connect.html">Connect</A> 
            method with no specified client you have to use 
            <STRONG>setClient</STRONG> 
            method    
              before. 
			</p>
			<p>    
                       
              If you are calling <STRONG>setClient</STRONG> 
            method when the connection is set to another client the previous 
            connection will be disconnected and new client will be    
                       
              set. 
			</p>
			
			<h3>Server specific notes</h3>
            <table width="100%" border=1 cellpadding=5>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/Oracle.html" title="Oracle server specific information">Oracle</A></STRONG></p>
					</td>
					<td>
                        <P>The SQLAPI++ Library requires 
                        OCI version 7.3 or higher. The Library tries to load 
                        OCI8 first. If it fails it tries to 
                        load OCI7.</P>
					</td>
				</tr>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/SQLServer_OleDb.html" title="SQL Server (OLE DB) specific information">SQL 
                        Server (OLE DB)</A> </STRONG> </p>
					</td>
					<td>
                        <P>Starting from version 3.3.1 
                        SQLAPI++ Library uses <U>OLE DB as 
                        default API</U> when working with SQL Server.<BR>The 
                        SQLAPI++ Library requires SQL Server OLE DB version 2.5 
                        or higher.</P>
					</td>
				</tr>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/SQLServer_DbLibrary.html" title="SQL Server (DB-Library) specific information">SQL 
                        Server (DB-Library)</A> </STRONG> </p>
					</td>
					<td>
                        <P>Starting from version 3.3.1 
                        SQLAPI++ Library uses <U>OLE DB as 
                        default API</U> when working with SQL Server. If you 
                        want to use <STRONG>DB-Library</STRONG>, you should set &quot;<STRONG 
                        >UseAPI</STRONG>&quot; <A href="Connection_setOption.html" >connection 
                        option</A> before specifying SQL Server client or 
                        connecting to database.<BR>The SQLAPI++ Library requires DB-Library version 6.x 
                        or higher.</P>
					</td>
				</tr>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/Sybase.html" title="Sybase server specific information">Sybase</A></STRONG> 
                        </p>
					</td>
					<td>
                        <P>The SQLAPI++ Library requires 
                        Open Client version 10.0 or higher.</P>
					</td>
				</tr>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/DB2.html" title="DB2 server specific information">DB2</A></STRONG> </p>
					</td>
					<td>
                        <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>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>The SQLAPI++ Library requires 
                        client API version 5.x or higher. 
                        All Firebird versions are supported also.</P>
					</td>
				</tr>
				<tr>
					<td>
						<p><STRONG><A 
                        href="../ServerSpecific/SQLBase.html" title="SQLBase server specific information">SQLBase</A></STRONG></p>
					</td>
					<td>
						<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>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>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>The SQLAPI++ Library requires ODBC version 3.x               or higher.</p>
					</td>
				</tr>
            </table>
			
			<h3>See also</h3>
            <P><A 
            href="Connection_Connect.html">Connect</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 don't find the answer to you 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 + -