📄 oracle.html
字号:
Field related. Should be specified before
fetching.</FONT></FONT></P> <STRONG>
<STRONG><P align=center> </P></STRONG></STRONG></FONT></TD>
<TD>
<P>
This option sets the character
set form of the field.
<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>
</TBODY></TABLE> </P>
<P>For more details see
<A href="../OnLineDoc/Connection_setOption.html">SAConnection::setOption</A>,
<A href="../OnLineDoc/Command_setOption.html">SACommand::setOption</A>,
<A href="../OnLineDoc/Field_setOption.html">SAField::setOption</A>,
<A href="../OnLineDoc/Param_setOption.html">SAParam::setOption</A>.</P>
<P> </P>
<H3><A name="Getting native Oracle API">Getting
native Oracle 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>Oracle</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>Oracle</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>
<P><STRONG>Oracle 7 (OCI7)</STRONG></P></TD>
<TD>
<P>Cast the result to <STRONG>class ora7API</STRONG>:</P>
<P><FONT face=System>saAPI *pResult = con.NativeAPI();<BR>ora7API *p_ora7API = (ora7API
*)pResult;</FONT></P></TD>
<TD>
<P><STRONG>#include <ora7API.h></STRONG></P></TD></TR>
<TR>
<TD>
<P><STRONG>Oracle 8 and
higher (OCI8)</STRONG></P></TD>
<TD>
<P>Cast the result to <STRONG>class ora8API</STRONG>:</P>
<P><FONT face=System>saAPI *pResult = con.NativeAPI();<BR>ora8API *p_ora8API = (ora8API
*)pResult;</FONT></P></TD>
<TD>
<P><STRONG>#include
<oraAPI.h></STRONG></P></TD></TR>
</TABLE> </P>
<P>To get more information about DBMS API
functions see this DBMS specific documentation. </P>
<P>For more details see <A
href="../OnLineDoc/Connection_NativeAPI.html">SAConnection::NativeAPI</A>.</P>
<P> </P>
<H3><A
name="Getting native Oracle connection related handles">Getting
native Oracle connection related handles</A> </H3>
<P>You have to use native API handles when you
want to call specific <STRONG>Oracle</STRONG>
API functions which are not directly
supported by the Library. API functions usually need to receive one
or more active handles as a parameter(s). <A
href="../OnLineDoc/Connection_NativeHandles.html">SAConnection::NativeHandles</A> method returns a pointer to
the set of native API <STRONG>connection
related</STRONG> handles. To use API handles directly you have to
downcast <STRONG>saConnectionHandles</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 specific
<STRONG>Oracle</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%">
<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="">Type casting</FONT>
</STRONG></P></TD></TR>
<TR>
<TD>
<P><STRONG>Oracle 7 (OCI7)</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=maroon face="">Cast the result</FONT></STRONG> to <STRONG>class
ora7ConnectionHandles</STRONG>:</P><FONT face=System>
<P><STRONG><FONT color=maroon face="">#include <ora7API.h></FONT> </STRONG></P>
<P>saConnectionHandles *pResult =
con.NativeHandles();<BR>ora7ConnectionHandles *p_ora7CH =
<BR>
(ora7ConnectionHandles *)pResult;</P>
<P><FONT face="Times New Roman"><STRONG><FONT
color=maroon face="">Available
handles:</FONT></STRONG></FONT> </P>
<UL>
<LI><FONT face="Times New Roman">Lda_Def m_lda; </FONT>
<LI><FONT face="Times New Roman">ub1 m_hda[512];</FONT></LI></UL></FONT></TD></TR>
<TR>
<TD>
<P><STRONG>Oracle 8 and higher(OCI8)</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=maroon face="">Cast the result</FONT></STRONG> to <STRONG>class
ora8ConnectionHandles</STRONG>:</P><FONT
face=System><FONT face=System>
<P><STRONG><FONT color=maroon face="">#include <oraAPI.h></FONT> </STRONG></P>
<P>saConnectionHandles *pResult =
con.NativeHandles</FONT>();<BR>ora8ConnectionHandles *p_ora8CH =<BR>
(ora8ConnectionHandles *)pResult; </P>
<P><FONT face="Times New Roman"><STRONG><FONT
color=maroon face="">Available
handles:</FONT></STRONG></FONT> </P></FONT><FONT
face=System>
<UL>
<LI><FONT face="Times New Roman">
OCIEnv
*m_pOCIEnv;
</FONT>
<LI><FONT face="Times New Roman">OCIError
*m_pOCIError; </FONT>
<LI><FONT face="Times New Roman">OCISvcCtx *m_pOCISvcCtx; </FONT>
<LI><FONT face="Times New Roman">OCIServer *m_pOCIServer; </FONT>
<LI><FONT face="Times New Roman">OCISession
*m_pOCISession;</FONT></LI></UL></FONT>
</td></tr>
</table></P>
<P>To get more information about DBMS API
functions and handles see this DBMS specific documentation.
</P>
<P>For more details see <A
href="../OnLineDoc/Connection_NativeHandles.html">SAConnection::NativeHandles</A>.</P>
<P> </P>
<H3><A
name="Getting native Oracle command related handles">Getting native
Oracle command related handles</A> </H3>
<P>You have to use native API handles when you
want to call specific <STRONG>Oracle</STRONG>
API functions which are not directly
supported by the Library. API functions usually need to receive one
or more active handles as a parameter(s). <A
href="../OnLineDoc/Command_NativeHandles.html">SACommand::NativeHandles</A> method returns a pointer to the
set of native API <STRONG>command
related</STRONG> handles. To use API handles directly you have to
downcast <STRONG>saCommandHandles</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 specific <STRONG>Oracle</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%">
<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="">Type casting</FONT>
</STRONG></P></TD></TR>
<TR>
<TD>
<P><STRONG>Oracle 7 (OCI7)</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=maroon face="">Cast the result</FONT></STRONG> to <STRONG>class
ora7CommandHandles</STRONG>:</P><FONT face=System>
<P><STRONG><FONT color=maroon face="">#include <ora7API.h></FONT> </STRONG></P>
<P>saCommandHandles *pResult =
cmd.NativeHandles();<BR>ora7CommandHandles *p_ora7CH =
<BR>
(ora7CommandHandles *)pResult;</P>
<P><FONT face="Times New Roman"><STRONG><FONT
color=maroon face="">Available
handles:</FONT></STRONG></FONT> </P>
<UL>
<LI><FONT face="Times New Roman">Cda_Def m_cda;</FONT></LI></UL></FONT></TD></TR>
<TR>
<TD>
<P><STRONG>Oracle 8 and higher(OCI8)</STRONG></P></TD>
<TD>
<P><STRONG><FONT color=maroon face="">Cast the result</FONT></STRONG> to <STRONG>class
ora8CommandHandles</STRONG>:</P><FONT face=System><FONT
face=System>
<P><STRONG><FONT color=maroon face="">#include <oraAPI.h></FONT> </STRONG></P>
<P>saCommandHandles *pResult =
cmd.NativeHandles</FONT>();<BR>ora8CommandHandles *p_ora8CH =<BR>
(ora8CommandHandles *)pResult; </P>
<P><FONT face="Times New Roman"><STRONG><FONT
color=maroon face="">Available
handles:</FONT></STRONG></FONT> </P>
<UL>
<LI><FONT face="Times New Roman">OCIStmt
*m_pOCIStmt; </FONT>
<LI><FONT face="Times New Roman">OCIError
*m_pOCIError;</FONT></LI></UL></FONT></TD></TR></TBODY></TABLE></P>
<P>To get more information about DBMS API
functions and handles see this DBMS specific documentation.
</P>
<P>For more details see <A
href="../OnLineDoc/Command_NativeHandles.html">SACommand::NativeHandles</A>.</P>
<P> </P>
<H3><A name="Error handling">Error
handling</A> </H3>
<P>When an error occurs inside SQLAPI++ Library
it throws an exception of type <A href="../OnLineDoc/Exception.html" >SAException</A>. <A
href="../OnLineDoc/Exception_ErrPos.html">SAException::ErrPos</A>
method gets an error position in SQL statement. In
<STRONG>Oracle</STRONG>
server <A
href="../OnLineDoc/Exception_ErrPos.html">SAException::ErrPos</A>
method returns parse error offset.</P>
<P>For more details see <A
href="../HowTo/errors.html">How To - Error handling</A>, <A
href="../OnLineDoc/Exception_Usage.html">SAException object</A>.</P>
<P> </P>
<H3><A
name="Special header files - Compile time">Special header files -
Compile time</A> </H3>
<P>The header files are in the <STRONG>include</STRONG> subdirectory of SQLAPI++
distributions:<BR><STRONG>#include <SQLAPI.h>
</STRONG>- main header, should be
used whenever SQLAPI++ is used.<BR><STRONG>#include <ora7API.h>, <oraAPI.h>
</STRONG>- <STRONG>Oracle</STRONG> API, should be included if direct OCI calls are
required.</P>
<P>For more details see <A
href="../OnLineDoc/index.html#Instructions for Compiling and Linking Applications with SQLAPI++">Online Documentation - Instructions for
Compiling and Linking Applications with SQLAPI++</A> </P>
<P> </P>
<h3>Problems and Questions</h3>
<p>If you haven't found the answer to you
questions or have some problems on using the Library, please, send
e-mail to <A href="mailto:howto@sqlapi.com">howto@sqlapi.com</A>. </p></TD>
<tr></tr></TBODY></TABLE></FONT>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -