📄 oracle.html
字号:
<P>The table below shows how SQLAPI++ data
types correspond with servers original data types:</P>
<P>
<TABLE border=1 cellPadding=5 width="100%">
<TR>
<TD>
<P><STRONG>When using new
OCI (Oracle 8 and higher):</STRONG></P></TD>
<TD>
<P><EM>SA_dtLongBinary</EM> <= > LONG RAW<BR
><EM>SA_dtLongChar</EM> <= > LONG<BR><EM>SA_dtBLob</EM> <=
> BLOB, FILE<BR><EM>SA_dtCLob </EM><= > CLOB</P></TD></TR>
<TR>
<TD>
<P><STRONG>When using OCI7:</STRONG></P></TD>
<TD>
<P><EM>SA_dtLongBinary</EM> <= > LONG RAW<BR
><EM>SA_dtLongChar</EM> <= > LONG<BR><EM>SA_dtBLob</EM> = >
LONG RAW<BR><EM>SA_dtCLob </EM>= > LONG</P></TD></TR>
</TABLE></P>
<P>
For more details see <A href="../HowTo/blobs.html">How To - Working with Long or Lob(CLob, BLob) data</A></P>
<P><STRONG>2.</STRONG> Binding Lob(CLob, BLob)
data when working with <STRONG>Oracle</STRONG>
server has some differences from others (see <A
href="../HowTo/bind.html">How To - Binding input parameters</A>).
It's necessary for a name of bind variable to be the same as the
column name it associated with.</P>
<P><FONT face=System>Ex.: Update TEST set <FONT
color=maroon face="">FBLOB = :fblob</FONT>
where FKEY =
'KEY'</FONT> </P>
<P>Therefore, it's impossible to bind Lob(CLob,
BLob) data to <STRONG>Oracle</STRONG>
database by position. </P>
<P>
For more details see <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>
In <STRONG>Oracle</STRONG>
output parameters are
available immediately after calling
<A
href="../OnLineDoc/Command_Execute.html" >SACommand::Execute</A>.</P>
<P>SQLAPI++ Library automatically creates <A href="../OnLineDoc/Param.html" >SAParam</A>
object to represent 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/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>obreak</STRONG> function with <STRONG>Oracle 7</STRONG> (OCI7) to cancel a
query. To get more details see <STRONG>obreak</STRONG> function description in
<STRONG>Oracle</STRONG>
documentation.</p>
<p>SQLAPI++ calls <STRONG>OCIBreak</STRONG> function with <STRONG>Oracle 8</STRONG> (OCI8) to cancel a
query. To get more details see <STRONG>OCIBreak</STRONG> function description in
<STRONG>Oracle</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, command, parameter and field
options</A> </H3>
<P>A server specific option can relate to a
connection, command, parameter or field. We recommend you specify each option in
an appropriate object, although it is possible to specify them in the parental object
as well. In that case the option affects all the child
objects. </P>
<P>
A connection related option must be specified in a
<A href="../OnLineDoc/Connection.html" >SAConnection</A>
object. </P>
<P>
A command related option
may be specified in either <A href="../OnLineDoc/Connection.html" >SAConnection</A>
object or <A href="../OnLineDoc/Command.html">SACommand</A>
object. If
it is specified in <A
href="../OnLineDoc/Connection.html">SAConnection</A>
object it affects all the commands on that
connection. </P>
<P>
A parameter related
option may be specified in <A href="../OnLineDoc/Connection.html">SAConnection</A>
object, <A href="../OnLineDoc/Command.html">SACommand</A>
object
or
<A href="../OnLineDoc/Param.html">SAParam</A>
object. If it is specified in <A
href="../OnLineDoc/Connection.html">SAConnection</A>
object it affects all the commands and therefore all
the parameters on that connection. If it is specified in <A
href="../OnLineDoc/Command.html">SACommand</A>
object
it affects all the parameters on that
command. </P>
<P>
A field related
option may be specified in <A href="../OnLineDoc/Connection.html">SAConnection</A>
object, <A href="../OnLineDoc/Command.html">SACommand</A>
object or <A
href="../OnLineDoc/Field.html">SAField</A>
object. If it is specified in <A
href="../OnLineDoc/Connection.html">SAConnection</A>
object it affects all the commands and therefore all
the fields on that connection. If it is specified in
<A href="../OnLineDoc/Command.html">SACommand</A>
object it affects all
the fields on that
command. </P>
<P>Specific options for <STRONG>Oracle</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 /
Scope</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><P align=center>Connection
related.</P></TD>
<TD>
<P>
Forces SQLAPI++ Library to use
directly OCI7 or new OCI8
(Oracle 8 and higher) API.</P>
<P><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 first. If it fails it
tries to connect using OCI7.</P>
</TD></TR>
<TR>
<TD> <STRONG><P align=center>
<STRONG>PreFetchRows</STRONG></P></STRONG><P align=center>Command related.
Should be specified before command execution. <STRONG>
<STRONG></STRONG></STRONG></P></TD>
<TD>
<P>
Forces SQLAPI++ Library to fetch
rows in bulk, rather than
retrieving records one by one.
<BR>
</P>
<P><EM>Valid values</EM>: String containing number of rows
in the fetch
buffer.
<BR><EM>Default value</EM>: "1".</P>
</TD></TR>
<TR>
<TD> <STRONG><P align=center>
<STRONG><FONT face=""
size=2>OCI_ATTR_CHARSET_ID</FONT></STRONG></P></STRONG><P align=center><FONT face=""
size=2><FONT face="" size=3>
Parameter related. Should be specified before command
execution.</FONT> <STRONG>
<STRONG></STRONG></STRONG></FONT></P></TD>
<TD>
<P>
This option sets character
set ID of the parameter.
<BR>
</P>
<P><EM>Valid values</EM>: String containing Oracle character set name
("US7ASCII", "CL8MSWIN1251",
"SF7DEC", etc.) or
its numeric code ("1",
"171", "21", etc.). See Oracle
documentation for more
details.
<BR>
By default SQLAPI++ doesn't change
Oracle settings
for this option. See Oracle
documentation for details.</P>
</TD></TR>
<TR>
<TD> <STRONG><P align=center>
<STRONG><FONT face=""
size=2>OCI_ATTR_CHARSET_FORM</FONT></STRONG></P></STRONG><FONT face=""
size=2><P align=center><FONT face=""
size=2><FONT face="" size=3>
Parameter related. Should be specified before command
execution.</FONT></FONT></P> <STRONG>
<STRONG><P align=center> </P></STRONG></STRONG></FONT></TD>
<TD>
<P>
This option sets the character
set form of the parameter.
<BR>
</P>
<P><EM>Valid values</EM>:
"SQLCS_IMPLICIT", "SQLCS_NCHAR". See Oracle
documentation for more
details.
<BR>
By default SQLAPI++ doesn't change
Oracle settings
for this option. See Oracle
documentation for details.</P>
</TD></TR>
<TR>
<TD> <STRONG><P align=center>
<STRONG><FONT face=""
size=2>OCI_ATTR_CHARSET_ID</FONT></STRONG></P></STRONG><P align=center><FONT face=""
size=2><FONT face="" size=3>
Field related. Should be specified before
fetching.</FONT> <STRONG>
<STRONG></STRONG></STRONG></FONT></P></TD>
<TD>
<P>
This option sets character
set ID of the field.
<BR>
</P>
<P><EM>Valid values</EM>: String containing Oracle character set name
("US7ASCII", "CL8MSWIN1251",
"SF7DEC", etc.) or
its numeric code ("1",
"171", "21", etc.). See Oracle
documentation for more
details.
<BR>
By default SQLAPI++ doesn't change
Oracle settings
for this option. See Oracle
documentation for details.</P>
</TD></TR>
<TR>
<TD> <STRONG><P align=center>
<STRONG><FONT face=""
size=2>OCI_ATTR_CHARSET_FORM</FONT></STRONG></P></STRONG><FONT face=""
size=2><P align=center><FONT face=""
size=2><FONT face="" size=3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -