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

📄 command_setoption.html

📁 能够连接各种数据库的API
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<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 - SACommand::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>&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/red.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/green.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>&nbsp;&nbsp;</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="Command_Usage.html" ><h3>Usage</h3></A>
					</td>
					<td align="left">
						<A style="TEXT-DECORATION: none" href="Command.html" ><h3>Class Members</h3></A>
					</td>
					<td align="left">
						<A style="TEXT-DECORATION: none" href="Command_Examples.html#Option" ><h3>Examples</h3></A>
					</td>
				</tr>			
				<tr>
					<td colspan="3"><h1 
      >SACommand::setOption</h1></td>
				</tr>			
			</table>

			<p><font face="Arial"><b>SAString &amp;setOption(const SAString 
            &amp;</b>sOptionName<b>);</b></font></p>

			<p>  Sets a string value of a specific command 
            option. 
			</p>

			<h3>Parameters</h3>
			<p><i>sOptionName</i>.&nbsp;&nbsp;&nbsp; A string key of the command 
            option.<p>

			<h3>Remarks</h3>
			<p>         
                  Call this method to set value(s) of server 
            specific command options. See <STRONG>Server 
            specific notes</STRONG>. 
            <P>A command related option may be specified in 
            either <A href="Connection.html">SAConnection</A>
            object or <A href="Command.html">SACommand</A>
            object. If it is specified 
            in <A href="Connection.html">SAConnection</A> 
            object it affects all 
            the commands on that connection. </P>
			<p>
             If an option is not specially assigned to 
            the <A href="Command.html">SACommand</A>
            object 
            the Library takes this option from related <A 
            href="Connection.html">SAConnection</A>
            object (see <A 
            href="Connection_Option.html">SAConnection::Option</A>&nbsp; method). If an option is not specified 
            in neither <A 
            href="Command.html">SACommand</A>&nbsp; 
            nor <A 
            href="Connection.html">SAConnection</A> objects, the Library takes the default option 
            value. 
			</p>
			<p><STRONG>setOption</STRONG> method is safe to 
            use in cross-server applications. An option related to a particular server does not affect 
            others.&nbsp; 
			</p>
            <P></P>
			
			<h3>Server specific notes</h3>
            <table width="100%" border=1 cellpadding=5>
                <TBODY>
                <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 command 
                        options</FONT>&nbsp; </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>PreFetchRows</STRONG><BR>Forces SQLAPI++ 
                        Library to fetch rows in bulk, rather than retrieving 
                        records one by one.<BR>Command 
                        related. Should be specified before command 
                        execution.
				<BR><EM>Valid 
                        values</EM>
					 : String 
                        containing number of rows in the fetch buffer. 
					<BR><EM>Default 
                        value</EM>
						 : "1".</P>
                        <P><STRONG>Overload</STRONG><BR>If 
                        procedure is overloaded (in a package) this option 
                        specifies which overload to call.<BR>Command related. Should be specified before 
                        describing parameters and command execution. It is 
                        recommened to specify it just after setting the command 
                        text.<BR><EM>Valid values</EM>: String 
                        containing overloaded procedure number (one based).<BR 
                        ><EM>Default value</EM>: "1". By 
                        default SQLAPI++ calls the first overload.</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>PreFetchRows</STRONG><BR>Forces SQLAPI++ 
                        Library to fetch rows in bulk, rather than retrieving 
                        records one by one.<BR>Command 
                        related. Should be specified before command 
                        execution.
				<BR><EM>Valid 
                        values</EM>
					 : String 
                        containing number of rows in the fetch buffer. 
					<BR><EM>Default 
                        value</EM>
						 : "1".</P><STRONG>
                        <P><STRONG>ICommandPrepare<BR></STRONG></STRONG>Controls 
                        current command preparation with ICommandPrepare 
                        interface. <BR>Command related. 
                        Should be specified before command preparation (either 
                        explicit or implicit).<BR><EM>Valid values</EM>: "skip" (skips 
                        ICommandPrepare-&gt;Prepare() call), 
                        "required" (calls 
                        ICommandPrepare-&gt;Prepare() and reports errors if 
                        any), "optional" (calls 
                        ICommandPrepare-&gt;Prepare() and ignores errors if 
                        any). <BR><EM>Default value</EM>: 
                        "optional", SQLAPI++ calls 
                        ICommandPrepare-&gt;Prepare() for the command, but 
                        doesn't check for errors.</p>

                        <P><STRONG>DBPROP_SERVERCURSOR<BR></STRONG><FONT face="" 
                        size=2><FONT face="" 
                        size=3><STRONG>DBPROP_OTHERINSERT 
                        <BR>DBPROP_OTHERUPDATEDELETE <BR>DBPROP_OWNINSERT 
                        <BR>DBPROP_OWNUPDATEDELETE 
                        <BR></STRONG></FONT></FONT>Forces SQL 
                        Server to return result sets using one of 
						the following methods:</P>
                        <UL>
                            <LI>Default result sets, 
                            which:<BR>- provide maximal 
                            performance in fetching data;<BR>- support only one active statement at a time 
                            on a connection. 
                            <LI>Server cursors, which:<BR 
                            >- support multiple active 
                            statements on a single connection;<BR>- can decrease performance relative to a 
                            default result set.</LI></UL>
                        <P>You can request different cursor 
                        behaviors in a rowset by setting rowset <FONT face="" 
                        size=3>properties <FONT face="" 
                        size=2><FONT face="" size=3 
                        >DBPROP_SERVERCURSOR, 
                        </FONT></FONT>DBPROP_OTHERINSERT, 
                        DBPROP_OTHERUPDATEDELETE, DBPROP_OWNINSERT, 
                        DBPROP_OWNUPDATEDELETE.</FONT> Some properties can be 
                        safely combined with others. See SQLOLEDB documentation 
                        to get more about how they affect SQL Server cursors. 
                        <BR>Command related. Should be 
                        specified before command execution.<BR><EM>Valid values </EM>  for 
                        <FONT face="" size=2><FONT face="" 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -