📄 connection_option.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::Option</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 style="TEXT-DECORATION: none" href="../index.html" >
<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 style="TEXT-DECORATION: none" href="../HowTo/index.html" > <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 style="TEXT-DECORATION: none" href="index.html" > <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 style="TEXT-DECORATION: none" href="../Support/index.html" > <font color="white" size="3" face="sans-serif">
<b>Support</b></font></A></td>
<td width="70" bgcolor="#000094" bordercolor="black" align="middle">
<A style="TEXT-DECORATION: none" href="../Download/index.html" >
<font color="white" size="3" face="sans-serif">
<b>Download</b></font></A></td>
<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A style="TEXT-DECORATION: none" href="../Order/index.html" > <font color="white" size="3" face="sans-serif">
<b>Order</b></font></A></td> </tr>
</table>
<p> </p>
<p> </p>
<table width="100%">
<tr>
<td valign="top" width="165"><!--LeftMenu-->
<table frame="void" CELLSPACING="5" width="165">
<tr><td><p> </p></td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12">
<A style="TEXT-DECORATION: none" href="Command.html" >
<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 style="TEXT-DECORATION: none" href="Connection.html" >
<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 style="TEXT-DECORATION: none" href="Exception.html" >
<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 style="TEXT-DECORATION: none" href="Field.html" >
<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 style="TEXT-DECORATION: none" href="Param.html" >
<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 style="TEXT-DECORATION: none" href="String.html" >
<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 style="TEXT-DECORATION: none" href="DateTime.html" >
<font color="white" size="2" face="sans-serif">
SADateTime</A> </FONT> </td>
</tr>
<tr>
<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12">
<A style="TEXT-DECORATION: none" href ="Numeric.html" >
<font color=white size=2 face=sans-serif>
SANumeric</A> </FONT> </td>
</tr>
<tr><td><hr></td></tr>
<tr>
<td>
<A style="TEXT-DECORATION: none" href ="Enums.html" >
<font color=white size=2 face=sans-serif>
Enums and Typedefs</A>
</FONT> </td>
</tr>
</table>
</td><!--empty column-->
<td width="20">
<p> </p>
</td><!--Content-->
<td valign="top" align="left">
<table width="100%" cellspacing="2" cellpadding="2">
<tr>
<td align="left">
<A style="TEXT-DECORATION: none" href="Connection_Usage.html" ><h3>Usage</h3></A>
</td>
<td align="left">
<A style="TEXT-DECORATION: none" href="Connection.html" ><h3>Class Members</h3></A>
</td>
<td align="left">
<A style="TEXT-DECORATION: none" href="Connection_Examples.html#Option" ><h3>Examples</h3></A>
</td>
</tr>
<tr>
<td colspan="3"><h1
>SAConnection::Option</h1></td>
</tr>
</table>
<p><font face="Arial"><b> SAString Option(const SAString &</b>sOptionName<b> ) const</b> <b >
;</b></font></p>
<p> Gets a string value of a specific connection or command option.
</p>
<h3>Parameters</h3>
<p><i>sOptionName</i>. A string key of the connection or command option.<p>
<h3>Remarks</h3>
<p>
Call this method to get
value(s) of server specific connection or command options. See <STRONG>Server specific
notes</STRONG>.
<P>A connection related option must be specified
in a <A href="Connection.html">SAConnection</A>
object. </P>
<p>If an option is not specified
in <A
href="Connection.html">SAConnection</A>
objects, the Library takes
the default option
value.
</p>
<P></P>
<h3>Server specific notes</h3>
<table width="100%" border=1 cellpadding=5>
<tr bgColor=#000094>
<td width="17%">
<p><STRONG><FONT color=white face="">DBMS client</FONT> </STRONG></p></td>
<td >
<P><STRONG><FONT color=white face="">Specific connection options</FONT> </STRONG></P></td>
</tr>
<tr>
<td>
<p><STRONG><A
title="Oracle server specific information" href="../ServerSpecific/Oracle.html" >Oracle</A></STRONG></p>
</td>
<td>
<p><STRONG>UseAPI</STRONG><BR>Forces
SQLAPI++ Library to use
directly OCI7 or new OCI8 (Oracle 8 and higher) API.<BR
>Connection related. <BR><EM>Valid values</EM>: "OCI7", "OCI8"
and "OCIAuto". <BR><EM>Default value</EM>: "OCIAuto". In this case
SQLAPI++
tries to connect to Oracle using new
OCI8 (Oracle 8
and higher) first. If it fails it
tries to connect using OCI7.</p>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
title="SQL Server (OLE DB) specific information" href="../ServerSpecific/SQLServer_OleDb.html" >SQL
Server (OLE DB)</A>
</STRONG> </p>
</td>
<td>
<p><STRONG>UseAPI</STRONG><BR>Forces
SQLAPI++ Library to use OLE DB or DB-Library API.<BR
>Connection related. <BR><EM>Valid values</EM>: "OLE DB" and
"DB-Library". <BR>
<EM>Default value</EM>: "OLE DB". SQLAPI++ uses OLE
DB as the default API.</p>
<P><STRONG>SSPROP_INIT_AUTOTRANSLATE<BR></STRONG>This
option configures OEM/ANSI character translation. See
SQLOLEDB documentation for more information. <BR
>Connection related. Should be
specified before connection is made.<BR><EM>Valid values</EM>: "VARIANT_TRUE",
"VARIANT_FALSE". <BR><EM>Default value</EM>: see OLE DB
documentation.</P>
<P><STRONG>SSPROP_INIT_APPNAME<BR></STRONG>Specifies the client application name. See
SQLOLEDB documentation for more information.
<BR>Connection related. Should be
specified before connection is made.
<BR><EM>Valid values</EM>: client application name string.
<BR><EM>Default value</EM>: none.</P>
<P><FONT face=""
size=3><STRONG>CoInitializeEx_COINIT
<BR></STRONG></FONT>Specifies the COM library
initialization mode. See SQLOLEDB documentation for more
information. <BR>Connection
related. Should be specified before connection is
made.<BR><EM>Valid
values</EM>:
"COINIT_MULTITHREADED",
"COINIT_APARTMENTTHREADED", "Skip"
(SQLAPI++ doesn't initialize COM), "Default"
(SQLAPI++ tries to set "COINIT_MULTITHREADED"
value; if it fails, SQLAPI++ tries to set
"COINIT_APARTMENTTHREADED"). <BR><EM>Default value</EM>: "Default".</P>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
title="SQL Server (DB-Library) specific information" href="../ServerSpecific/SQLServer_DbLibrary.html" >SQL
Server (DB-Library)</A>
</STRONG> </p>
</td>
<td>
<p><STRONG>UseAPI</STRONG><BR>Forces SQLAPI++
Library to use OLE DB or DB-Library API.<BR>Connection related. <BR>
<EM>Valid values</EM>: "OLE DB" and "DB-Library".
<BR><EM>Default value</EM>: "OLE DB". SQLAPI++ uses OLE
DB as the default API.</p>
</td>
</tr>
<tr>
<td>
<p><STRONG><A
title="Sybase server specific information" href="../ServerSpecific/Sybase.html" >Sybase</A></STRONG></p>
</td>
<td>
<P><STRONG>CS_PACKETSIZE</STRONG><BR>Determines the packet size that Client-Library uses
when sending Tabular Data Stream (TDS) packets. For more
information see Sybase documentation.<BR>Connection related. Should be specified before
actual connection is made.<BR>
<EM>Valid values</EM>: String containing packet size, see Sybase
documentation.<BR><EM>Default value</EM>: see
Sybase documentation.</P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -