📄 sqlserver_dblibrary.html
字号:
<BR><EM>eSAClient.</EM> Optional. One of the
following values from <STRONG>SAClient_t</STRONG> enum:
<UL>
<LI><STRONG>SA_SQLServer_Client</STRONG>
SQLServer client.
<LI><STRONG>SA_Client_NotSpecified</STRONG>
Used by default if <EM>eSAClient</EM>parameter is
omitted. You can use this default value only if you have
call <A
href="../OnLineDoc/Connection_setClient.html">SAConnection::setClient</A>
method with <STRONG>SA_SQLServer_Client</STRONG> constant before.</LI>
</UL>
<P>The SQLAPI++ Library requires DB-Library
version 6.x or higher.</P>
<P>For more details see <A
href="../HowTo/connect.html">How To - Connecting to databases</A>, <A
href="../OnLineDoc/Connection_Usage.html">SAConnection object</A>, <A
href="../OnLineDoc/Connection_Connect.html">SAConnection::Connect</A>.</P>
<P> </P>
<H3><A
name="Transaction isolation levels">Transaction isolation
levels</A> </H3>
<P>SQL-92 defines four isolation levels, all of
which are supported by SQLAPI++:</P>
<UL>
<LI>Read uncommitted (the lowest level where
transactions are isolated just enough to ensure that physically
corrupt data is not read)
<LI>Read committed
<LI>Repeatable read
<LI>Serializable (the highest level, where
transactions are completely isolated from one another)</LI></UL>
<P>SQLAPI++ maps different isolation levels on
<STRONG>SQL Server (DB-Library)</STRONG> in the following way:</P>
<P> <STRONG
>SA_ReadUncommitted</STRONG> = 'READ
UNCOMMITTED'<BR><STRONG> SA_ReadCommitted</STRONG> =
'READ COMMITTED'<BR><STRONG> SA_RepeatableRead</STRONG> =
'REPEATABLE
READ'<BR><STRONG> SA_Serializable</STRONG> =
'SERIALIZABLE'</P>
<P>For more details see <A
href="../OnLineDoc/Connection_setIsolationLevel.html">SAConnection::setIsolationLevel</A>.</P>
<P> </P>
<H3><A
name="Working with Long or Lob(CLob, BLob) data">Working with Long or Lob(CLob,
BLob) data</A> </H3>
<P>
SQLAPI++ supports four types for working with
Lob(CLob, BLob) data:</P>
<P>
<TABLE border=1 cellPadding=1 cellSpacing=1 style="WIDTH: 100%"
width=100%>
<TR bgColor=navy>
<TD><FONT color=white
style="BACKGROUND-COLOR: #000080">Name</FONT></TD>
<TD><FONT color=white
style="BACKGROUND-COLOR: #000080">C
enum constant</FONT></TD>
</TR>
<TR>
<TD>LongBinary</TD>
<TD>SA_dtLongBinary</TD>
</TR>
<TR>
<TD>LongChar</TD>
<TD>SA_dtLongChar</TD>
</TR>
<TR>
<TD>BLob (Binary Large object)</TD>
<TD>SA_dtBLob</TD>
</TR>
<TR>
<TD>CLob (Character Large object)</TD>
<TD>SA_dtCLob</TD>
</TR></TABLE></P>
<P>The table below shows how SQLAPI++ data types
correspond with <STRONG>SQL Server's (DB-Library)</STRONG>
original data types:</P>
<P><EM>SA_dtLongBinary</EM>
<= > IMAGE<BR><EM>SA_dtLongChar</EM> <= > TEXT<BR><EM
>SA_dtBLob</EM> = > IMAGE<BR><EM>SA_dtCLob </EM>=> TEXT</EM></P>
<P>
For more details see <A href="../HowTo/blobs.html">How To - Working with Long or Lob(CLob, BLob) data</A>
, <A href="../HowTo/bind.html">How To - Binding input parameters</A>.</P>
<P> </P>
<H3><A
name="Returning output parameters">Returning output
parameters</A> </H3>
<P><STRONG>SQL Server</STRONG>
stored
procedures can have integer return codes and output parameters. The
return codes and output
parameters are sent in the last packet from the server and are
therefore not available to the application until all result sets
from stored procedure (if any) are completely processed using <A href="../OnLineDoc/Command_FetchNext.html" >SACommand::FetchNext</A>
method.</P>
<P>SQLAPI++ Library automatically creates <A
href="../OnLineDoc/Param.html" >SAParam</A>
object to represent procedure status return code or function
return value. You can refer to this <A
href="../OnLineDoc/Param.html" >SAParam</A>
object using SQLAPI++ predefined
name <STRONG>"RETURN_VALUE"</STRONG>.</P>
<P>For more details see <A
href="../OnLineDoc/Command_Execute.html">SACommand::Execute</A>,
<A href="../OnLineDoc/Command_FetchNext.html">SACommand::FetchNext</A>,
<A href="../OnLineDoc/Param_Usage.html">SAParam
object</A>, <A
href="../HowTo/return_param.html">How To - Returning Output Parameters</A>.</P>
<P> </P>
<H3><A name="Cancelling queries">Cancelling
queries</A> </H3>
<P>Using <A
href="../OnLineDoc/Command_Cancel.html">SACommand::Cancel</A>
method
you can cancel the following types of processing on a statement: </P>
<UL type=disc>
<LI>A function running asynchronously on
the statement.<BR>
<LI>A function running on the statement on
another thread. </LI></UL>
<p>For <STRONG>SQL Server (DB-Library)</STRONG>
SQLAPI++ calls <STRONG>dbcancel</STRONG>
function to cancel a query. To get more
details see <STRONG>dbcancel</STRONG>
function
description in <STRONG>SQL Server DB-Library</STRONG>
documentation.<BR>To
enable cancellation you have to set command option
"UseDataReadyLoopOnExecute" to "on".</p>
<P>For more details see <A href="../OnLineDoc/Command_Cancel.html" >SACommand::Cancel</A>, <A
href="SQLServer_DbLibrary.html#Connection and command options">SQL Server (DB-Library)
connection and command options</A>.</P>
<P> </P>
<H3><A
name="Connection and command options">Connection and command
options</A> </H3>
<P>A server specific option can be related with a command or with a
connection. A connection related option must be specified in a
<A href="../OnLineDoc/Connection.html" >SAConnection</A>
object. A command related option
may be specified in either <A href="../OnLineDoc/Connection.html" >SAConnection</A>
object or <A href="../OnLineDoc/Command_Usage.html" >SACommand</A>
object. </P>
<P>Specific options for <STRONG>SQL Server (DB-Library)</STRONG>:</P>
<P>
<TABLE border=1 cellPadding=5 width=100%>
<TBODY>
<TR bgColor=#000094>
<TD width=17%>
<P><STRONG><FONT color=white face="">Option name</FONT>
</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=white face=""> Description</FONT>
</STRONG></P></TD></TR>
<TR>
<TD><STRONG>
<P align=center>
<STRONG>UseAPI</STRONG>
</P></STRONG>
</TD>
<TD>
<P>
Forces SQLAPI++
Library to use OLE DB or DB-Library
API.<BR > <STRONG>Connection
related.</STRONG>
<BR>
Valid
values: "OLE
DB" and "DB-Library".
<BR>
Default
value: "OLE DB". SQLAPI++
uses
OLE
DB as the default API.</P></TD></TR>
<TR>
<TD>
<P align=center><STRONG><STRONG>OpenCursor</STRONG>
</STRONG></P></TD>
<TD>
<P>Forces SQLAPI++ Library to use
DB-Library cursor functions to process the command
execution result set. It allows to open several result
sets simultaneously in one transaction. For more
information see SQLServer (DB-Library) documentation.
<BR
> <STRONG>Command related.
</STRONG>
<BR>
Valid values:
"number of rows[, scroll option]". String
containing number of rows in the fetch buffer and
(optional) scroll option. Valid values for scroll option
are: CUR_DYNAMIC, CUR_FORWARD, CUR_KEYSET,
CUR_INSENSITIVE. If scroll option parameter is omitted
then CUR_FORWARD value is used. For more information see
DB-Library documentation.
<BR >
Default value: "0".
"0" means that the command doesn't use a
cursor to process its statement.</P></TD></TR>
<TR>
<TD><STRONG><STRONG>
<P align=center><STRONG><STRONG>
<STRONG>UseDataReadyLoopOnExecute</STRONG></STRONG>
</STRONG></P></STRONG>
</STRONG></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -