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

📄 ocilib_8h-source.html

📁 ORACLE编程的好东西,纯C写的OCI封装.很好用,支持数据池.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a name="l00544"></a>00544 <span class="preprocessor"></span><span class="preprocessor">    #define mtsncat         strncat</span><a name="l00545"></a>00545 <span class="preprocessor"></span><span class="preprocessor">    #define mtslen          strlen</span><a name="l00546"></a>00546 <span class="preprocessor"></span><span class="preprocessor">    #define mtscmp          strcmp</span><a name="l00547"></a>00547 <span class="preprocessor"></span><span class="preprocessor">    #define mtscasecmp      ocistrcasecmp</span><a name="l00548"></a>00548 <span class="preprocessor"></span><span class="preprocessor">    #define mtsprintf       ocisprintf</span><a name="l00549"></a>00549 <span class="preprocessor"></span><span class="preprocessor">    #define mtstol          strtol</span><a name="l00550"></a>00550 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00551"></a>00551 <span class="preprocessor"></span><a name="l00552"></a>00552 <span class="preprocessor">#ifdef OCI_USERDATA_UNICODE</span><a name="l00553"></a>00553 <span class="preprocessor"></span><span class="preprocessor">    #define dtsdup          ociwcsdup</span><a name="l00554"></a>00554 <span class="preprocessor"></span><span class="preprocessor">    #define dtscpy          wcscpy</span><a name="l00555"></a>00555 <span class="preprocessor"></span><span class="preprocessor">    #define dtsncpy         wcsncpy</span><a name="l00556"></a>00556 <span class="preprocessor"></span><span class="preprocessor">    #define dtscat          wcscat</span><a name="l00557"></a>00557 <span class="preprocessor"></span><span class="preprocessor">    #define dtsncat         wcsncat</span><a name="l00558"></a>00558 <span class="preprocessor"></span><span class="preprocessor">    #define dtslen          wcslen</span><a name="l00559"></a>00559 <span class="preprocessor"></span><span class="preprocessor">    #define dtscmp          wcscmp</span><a name="l00560"></a>00560 <span class="preprocessor"></span><span class="preprocessor">    #define dtscasecmp      ociwcscasecmp</span><a name="l00561"></a>00561 <span class="preprocessor"></span><span class="preprocessor">    #define dtsprintf       swprintf</span><a name="l00562"></a>00562 <span class="preprocessor"></span><span class="preprocessor">    #define dtstol          wcstol</span><a name="l00563"></a>00563 <span class="preprocessor"></span><a name="l00564"></a>00564 <span class="preprocessor">#else</span><a name="l00565"></a>00565 <span class="preprocessor"></span><span class="preprocessor">    #define dtsdup          ocistrdup</span><a name="l00566"></a>00566 <span class="preprocessor"></span><span class="preprocessor">    #define dtscpy          strcpy</span><a name="l00567"></a>00567 <span class="preprocessor"></span><span class="preprocessor">    #define dtsncpy         strncpy</span><a name="l00568"></a>00568 <span class="preprocessor"></span><span class="preprocessor">    #define dtscat          strcat</span><a name="l00569"></a>00569 <span class="preprocessor"></span><span class="preprocessor">    #define dtsncat         strncat</span><a name="l00570"></a>00570 <span class="preprocessor"></span><span class="preprocessor">    #define dtslen          strlen</span><a name="l00571"></a>00571 <span class="preprocessor"></span><span class="preprocessor">    #define dtscmp          strcmp</span><a name="l00572"></a>00572 <span class="preprocessor"></span><span class="preprocessor">    #define dtscasecmp      ocistrcasecmp</span><a name="l00573"></a>00573 <span class="preprocessor"></span><span class="preprocessor">    #define dtsprintf       ocisprintf</span><a name="l00574"></a>00574 <span class="preprocessor"></span><span class="preprocessor">    #define dtstol          strtol</span><a name="l00575"></a>00575 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00576"></a>00576 <span class="preprocessor"></span><a name="l00577"></a>00577 <span class="comment">/* string size macros */</span><a name="l00578"></a>00578 <a name="l00579"></a>00579 <span class="preprocessor">#define mtextsize(s) (mtslen(s) * sizeof(mtext))</span><a name="l00580"></a>00580 <span class="preprocessor"></span><span class="preprocessor">#define dtextsize(s) (dtslen(s) * sizeof(dtext))</span><a name="l00581"></a>00581 <span class="preprocessor"></span><a name="l00582"></a>00582 <span class="preprocessor">#define msizeof(s) (sizeof(s) / sizeof(mtext))</span><a name="l00583"></a>00583 <span class="preprocessor"></span><span class="preprocessor">#define dsizeof(s) (sizeof(s) / sizeof(dtext))</span><a name="l00584"></a>00584 <span class="preprocessor"></span><a name="l00640"></a>00640 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___conn_pool.html" title="Oracle Connection Pool.">OCI_ConnPool</a> <a class="code" href="struct_o_c_i___conn_pool.html" title="Oracle Connection Pool.">OCI_ConnPool</a>;<a name="l00641"></a>00641 <a name="l00658"></a>00658 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___connection.html" title="Oracle physical connection.">OCI_Connection</a> <a class="code" href="struct_o_c_i___connection.html" title="Oracle physical connection.">OCI_Connection</a>;<a name="l00659"></a>00659 <a name="l00670"></a>00670 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___statement.html" title="Oracle SQL or PL/SQL statement.">OCI_Statement</a> <a class="code" href="struct_o_c_i___statement.html" title="Oracle SQL or PL/SQL statement.">OCI_Statement</a>;<a name="l00671"></a>00671 <a name="l00685"></a>00685 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___resultset.html" title="Collection of output columns from a select statement.">OCI_Resultset</a> <a class="code" href="struct_o_c_i___resultset.html" title="Collection of output columns from a select statement.">OCI_Resultset</a>;<a name="l00686"></a>00686 <a name="l00697"></a>00697 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___column.html" title="Oracle SQL Column and Type member representation.">OCI_Column</a> <a class="code" href="struct_o_c_i___column.html" title="Oracle SQL Column and Type member representation.">OCI_Column</a>;<a name="l00698"></a>00698 <a name="l00720"></a>00720 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___lob.html" title="Oracle Internal Large objects :.">OCI_Lob</a> <a class="code" href="struct_o_c_i___lob.html" title="Oracle Internal Large objects :.">OCI_Lob</a>;<a name="l00721"></a>00721 <a name="l00747"></a>00747 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___file.html" title="Oracle External Large objects :.">OCI_File</a> <a class="code" href="struct_o_c_i___file.html" title="Oracle External Large objects :.">OCI_File</a>;<a name="l00748"></a>00748 <a name="l00762"></a>00762 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___transaction.html" title="Oracle Transaction.">OCI_Transaction</a>  <a class="code" href="struct_o_c_i___transaction.html" title="Oracle Transaction.">OCI_Transaction</a>;<a name="l00763"></a>00763 <a name="l00784"></a>00784 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___long.html" title="Oracle Long datatype.">OCI_Long</a> <a class="code" href="struct_o_c_i___long.html" title="Oracle Long datatype.">OCI_Long</a>;<a name="l00785"></a>00785 <a name="l00794"></a>00794 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___date.html" title="Oracle internal date representation.">OCI_Date</a> <a class="code" href="struct_o_c_i___date.html" title="Oracle internal date representation.">OCI_Date</a>;<a name="l00795"></a>00795 <a name="l00804"></a>00804 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___timestamp.html" title="Oracle internal timespamp representation.">OCI_Timestamp</a> <a class="code" href="struct_o_c_i___timestamp.html" title="Oracle internal timespamp representation.">OCI_Timestamp</a>;<a name="l00805"></a>00805 <a name="l00814"></a>00814 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___interval.html" title="Oracle internal interval representation.">OCI_Interval</a> <a class="code" href="struct_o_c_i___interval.html" title="Oracle internal interval representation.">OCI_Interval</a>;<a name="l00815"></a>00815 <a name="l00824"></a>00824 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___object.html" title="Oracle Named types representation.">OCI_Object</a> <a class="code" href="struct_o_c_i___object.html" title="Oracle Named types representation.">OCI_Object</a>;<a name="l00825"></a>00825 <a name="l00834"></a>00834 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___coll.html" title="Oracle Collections (VARRAYs and Nested Tables) representation.">OCI_Coll</a> <a class="code" href="struct_o_c_i___coll.html" title="Oracle Collections (VARRAYs and Nested Tables) representation.">OCI_Coll</a>;<a name="l00835"></a>00835 <a name="l00844"></a>00844 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___elem.html" title="Oracle Collection item representation.">OCI_Elem</a> <a class="code" href="struct_o_c_i___elem.html" title="Oracle Collection item representation.">OCI_Elem</a>;<a name="l00845"></a>00845 <a name="l00853"></a>00853 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___iter.html" title="Oracle Collection iterator representation.">OCI_Iter</a> <a class="code" href="struct_o_c_i___iter.html" title="Oracle Collection iterator representation.">OCI_Iter</a>;<a name="l00854"></a>00854 <a name="l00863"></a>00863 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___schema.html" title="Schema metadata handle.">OCI_Schema</a> <a class="code" href="struct_o_c_i___schema.html" title="Schema metadata handle.">OCI_Schema</a>;<a name="l00864"></a>00864 <a name="l00873"></a>00873 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___hash_table.html" title="OCILIB implementation of hash tables.">OCI_HashTable</a> <a class="code" href="struct_o_c_i___hash_table.html" title="OCILIB implementation of hash tables.">OCI_HashTable</a>;<a name="l00874"></a>00874 <a name="l00887"></a>00887 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___error.html" title="Encapsulates an Oracle or OCILIB exception.">OCI_Error</a> <a class="code" href="struct_o_c_i___error.html" title="Encapsulates an Oracle or OCILIB exception.">OCI_Error</a>;<a name="l00888"></a>00888 <a name="l00897"></a>00897 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___mutex.html" title="OCILIB encapsulation of OCI mutexes.">OCI_Mutex</a> <a class="code" href="struct_o_c_i___mutex.html" title="OCILIB encapsulation of OCI mutexes.">OCI_Mutex</a>;<a name="l00898"></a>00898 <a name="l00907"></a>00907 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___thread.html" title="OCILIB encapsulation of OCI Threads.">OCI_Thread</a> <a class="code" href="struct_o_c_i___thread.html" title="OCILIB encapsulation of OCI Threads.">OCI_Thread</a>;<a name="l00908"></a>00908 <a name="l00921"></a>00921 <span class="keyword">typedef</span> void (*POCI_ERROR) (<a class="code" href="struct_o_c_i___error.html" title="Encapsulates an Oracle or OCILIB exception.">OCI_Error</a> *err);<a name="l00922"></a>00922 <a name="l00931"></a>00931 <span class="keyword">typedef</span> void (*POCI_THREAD) (<a class="code" href="struct_o_c_i___thread.html" title="OCILIB encapsulation of OCI Threads.">OCI_Thread</a> *thread, <span class="keywordtype">void</span> *arg);<a name="l00932"></a>00932 <a name="l00944"></a>00944 <span class="keyword">typedef</span> void (*POCI_THREADKEYDEST) (<span class="keywordtype">void</span> *data);<a name="l00945"></a>00945 <a name="l00946"></a>00946 <span class="comment">/* public structures */</span><a name="l00947"></a>00947 <a name="l00956"></a><a class="code" href="struct_o_c_i___x_i_d.html">00956</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_c_i___x_i_d.html" title="Global transaction identifier.">OCI_XID</a> {<a name="l00957"></a>00957         <span class="keywordtype">long</span> formatID;                  <a name="l00958"></a>00958         <span class="keywordtype">long</span> gtrid_length;                      <a name="l00959"></a>00959         <span class="keywordtype">long</span> bqual_length;      <a name="l00960"></a>00960         <span class="keywordtype">char</span> data[128];<a name="l00961"></a>00961 } <a class="code" href="struct_o_c_i___x_i_d.html" title="Global transaction identifier.">OCI_XID</a>;<a name="l00962"></a>00962 <a name="l00974"></a><a class="code" href="union_o_c_i___variant.html">00974</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="union_o_c_i___variant.html" title="Internal Variant type based on union C type.">OCI_Variant</a> {<a name="l00975"></a>00975     <span class="comment">/* integers */</span><a name="l00976"></a>00976     <span class="keywordtype">int</span>           num;<a name="l00977"></a>00977     <span class="comment">/* raw data */</span><a name="l00978"></a>00978     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *p_bytes;<a name="l00979"></a>00979     <span class="comment">/* pointer to c natives types */</span><a name="l00980"></a>00980     <span class="keywordtype">void</span>          *p_void;<a name="l00981"></a>00981     <span class="keywordtype">int</span>           *p_int;<a name="l00982"></a>00982     <span class="keywordtype">double</span>        *p_double;<a name="l00983"></a>00983     dtext         *p_dtext;<a name="l00984"></a>00984     mtext         *p_mtext;<a name="l00985"></a>00985     <span class="comment">/* ocilib object types */</span><a name="l00986"></a>00986     <a class="code" href="struct_o_c_i___date.html" title="Oracle internal date representation.">OCI_Date</a>      *p_date;<a name="l00987"></a>00987     <a class="code" href="struct_o_c_i___interval.html" title="Oracle internal interval representation.">OCI_Interval</a>  *p_interval;<a name="l00988"></a>00988     <a class="code" href="struct_o_c_i___timestamp.html" title="Oracle internal timespamp representation.">OCI_Timestamp</a> *p_timestamp;<a name="l00989"></a>00989     <a class="code" href="struct_o_c_i___long.html" title="Oracle Long datatype.">OCI_Long</a>      *p_long;<a name="l00990"></a>00990     <a class="code" href="struct_o_c_i___lob.html" title="Oracle Internal Large objects :.">OCI_Lob</a>       *p_lob;<a name="l00991"></a>00991     <a class="code" href="struct_o_c_i___file.html" title="Oracle External Large objects :.">OCI_File</a>      *p_file;<a name="l00992"></a>00992     <a class="code" href="struct_o_c_i___statement.html" title="Oracle SQL or PL/SQL statement.">OCI_Statement</a> *p_stmt;<a name="l00993"></a>00993     <a class="code" href="struct_o_c_i___column.html" title="Oracle SQL Column and Type member representation.">OCI_Column</a>    *p_col;<a name="l00994"></a>00994     <a class="code" href="struct_o_c_i___object.html" title="Oracle Named types representation.">OCI_Object</a>    *p_obj;<a name="l00995"></a>00995     <a class="code" href="struct_o_c_i___coll.html" title="Oracle Collections (VARRAYs and Nested Tables) representation.">OCI_Coll</a>      *p_coll;<a name="l00996"></a>00996     <a class="code" href="struct_o_c_i___iter.html" title="Oracle Collection iterator representation.">OCI_Iter</a>      *p_iter;<a name="l00997"></a>00997     <a class="code" href="struct_o_c_i___elem.html" title="Oracle Collection item representation.">OCI_Elem</a>      *p_elem;<a name="l00998"></a>00998 } <a class="code" href="union_o_c_i___variant.html" title="Internal Variant type based on union C type.">OCI_Variant</a>; 

⌨️ 快捷键说明

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