📄 sqlbase.html
字号:
<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>SQLBase</STRONG> server in the following way:</P>
<P> <STRONG
>SA_ReadUncommitted</STRONG> = SQLILRL
('RL')<BR><STRONG> SA_ReadCommitted</STRONG> =
SQLILCS
('CS')<BR><STRONG> SA_RepeatableRead</STRONG> = SQLILRR
('RR')<BR><STRONG> SA_Serializable</STRONG> =
SQLILRO
('RO')</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
Long or 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 servers original data types:</P>
<P><EM>SA_dtLongBinary</EM> <= > LONG VARCHAR<BR><EM>SA_dtLongChar</EM>
<=
> LONG VARCHAR<BR
><EM>SA_dtBLob</EM> = > LONG
VARCHAR<BR><EM>SA_dtCLob
</EM>=> LONG VARCHAR</EM></P>
<P>
For more details see <A href="../HowTo/blobs.html">How To - Working with Long or Lob(CLob, BLob) data</A></P>
<P> </P>
<H3><A
name="Returning output parameters">Returning output
parameters</A> </H3>
<p>If <STRONG>SQLBase</STRONG> stored procedure returns only
one row of output parameters (the most common case), you can
get output parameters' values immediately after calling <A
href="../OnLineDoc/Command_Execute.html"
>SACommand::Execute</A>
using appropriate <A
href="../OnLineDoc/Param.html">SAParam</A> objects.</p>
<P>
In <STRONG>SQLBase</STRONG> stored procedures can also return
several rows of output parameters. In this case
SQLBase
returns them as a result set and you can
fetch them row by row using <A
href="../OnLineDoc/Command_FetchNext.html">SACommand::FetchNext</A>
method after calling
<A href="../OnLineDoc/Command_Execute.html">SACommand::Execute</A>
method.</P>
<P>For more details see <A
href="../OnLineDoc/Command_Execute.html" >SACommand::Execute</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>SQLAPI++ calls <STRONG>sqlcan</STRONG> function to cancel a query. To get more details
see <STRONG>sqlcan</STRONG> function
description in <STRONG>SQLBase</STRONG>
documentation.</p>
<P>For more details see <A href="../OnLineDoc/Command_Cancel.html" >SACommand::Cancel</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> SQLBase</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>
<P align=center><STRONG><STRONG><STRONG>
<STRONG>
SQPPCX </STRONG></STRONG></STRONG>
</STRONG></P></TD>
<TD>
<P>Controls cursor-context
preservation. For more information see SQLBase documentation. <BR
><STRONG>Command
related.</STRONG>
<BR>Valid values:
"off" and "on".
<BR>Default
value: see SQLBase documentation.</P></TD></TR>
</TBODY>
</TABLE>
</P>
<P>For more details see <A
href="../OnLineDoc/Command_setOption.html">SACommand::setOption</A>, <A
href="../OnLineDoc/Connection_setOption.html">SAConnection::setOption</A>.</P>
<P> </P>
<H3><A
name="Getting native SQLBase API">Getting native SQLBase
API</A> </H3>
<P>You can call client specific API functions
which are not directly supported by SQLAPI++ Library. <A
href="../OnLineDoc/Connection_NativeAPI.html">SAConnection::NativeAPI</A>
method returns a pointer to the set of native API functions
available for <STRONG>SQLBase</STRONG>
. To use the database API directly you have to downcast
this <STRONG>saAPI</STRONG> pointer to the appropriate type and use its
implementation-specific members. The following table shows what type
cast you have to make and what additional header file you have to
include to work with <STRONG>SQLBase</STRONG>
API. Note that using appropriate type casting depends
on an API version (that generally mean that you have to explicitly
check client version before casting, see <A
href="../OnLineDoc/Connection_ClientVersion.html">SAConnection::ClientVersion</A>
method). </P>
<P>
<TABLE border=1 cellPadding=5 width=100%>
<TR bgColor=#000094>
<TD width=30>
<P><STRONG><FONT color=white face="">DBMS client</FONT>
</STRONG></P></TD>
<TD style="WIDTH: 300px" width=300>
<P><STRONG><FONT color=white face="">Type casting</FONT>
</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=white face="">Additional
<BR>include
file</FONT> </STRONG></P></TD></TR>
<TR>
<TD><STRONG>
<p><STRONG>SQLBase 6</STRONG></p> </STRONG></TD>
<TD>
<P>Cast the result to <STRONG>class sb6API</STRONG>:</P>
<P><FONT face=System>saAPI *pResult = con.NativeAPI();<BR>sb6API *p_sb6API = (sb6API
*)pResult;</FONT></P></TD>
<TD>
<P><STRONG>#include <sbAPI.h></STRONG></P></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -