亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? otl4_ex491.htm

?? ISO_C++:C++_OTL開發文檔
?? HTM
字號:
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
  <meta name="Author" content="Sergei Kuchin">
  <meta name="GENERATOR"
 content="Mozilla/4.77 [en] (Win95; U) [Netscape]">
  <meta name="KeyWords"
 content="OTL, Oracle, ODBC, DB2, CLI, database API, C++, Template Library">
  <title>OTL 4.0, Example 491 (UTF8, VARCHAR2 and otl_refcur_stream)</title>
</head>
<body>
<center>
<h1>OTL 4.0, Example 491 (UTF8, VARCHAR2, and otl_refcur_stream)</h1>
</center>
<h2>Source Code</h2>
<pre>#include &lt;iostream&gt;<br>using namespace std;<br><br>#include &lt;stdio.h&gt;</pre>
<pre>#define OTL_ORA9I // Compile OTL 4.0/OCI9i<br>#define <a
 href="otl3_compile.htm#OTL_ORA_UTF8">OTL_ORA_UTF8</a> // Enable UTF8 OTL for OCI9i<br>#include &lt;otlv4.h&gt; // include the OTL 4.0 header file<br><br>// Sample UTF8 based string<br>unsigned char utf8_sample[]=<br>{0x61,0x62,0x63,0xd0,0x9e,0xd0,0x9b,0xd0,<br> 0xac,0xd0,0x93,0xd0,0x90,0x0};<br><br><a
 href="otl3_connect_class.htm">otl_connect</a> db; // connect object<br><br>void insert()<br>// insert rows into table<br>{&nbsp;<br>&nbsp;<a
 href="otl3_stream_class.htm">otl_stream</a> o(50, // buffer size<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "insert into test_tab values(:f1&lt;int&gt;,:f2&lt;char[31]&gt;)",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // SQL statement<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; db // connect object<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>&nbsp;unsigned char tmp[31];<br><br>&nbsp;for(int i=1;i&lt;=100;++i){<br>   strcpy(reinterpret_cast&lt;char*&gt;(tmp),reinterpret_cast&lt;const char*&gt;(utf8_sample));<br>&nbsp; o&lt;&lt;i;<br>&nbsp; o&lt;&lt;tmp;&nbsp;<br>&nbsp;}<br><br>}<br><br>void select()<br>{&nbsp;<br>&nbsp;<a
 href="otl3_stream_class.htm">otl_stream</a> i(1, // buffer size<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "begin "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " open <b>:cur&lt;refcur,out[50]&gt; </b>for "<br>&nbsp;&nbsp;&nbsp;&nbsp; // :cur is a bind variable name, refcur -- its type,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; // out -- output parameter, 50 -- the buffer size when this<br>&nbsp;&nbsp;&nbsp;&nbsp; // reference cursor will be attached to <a
 href="otl4_refcur_stream.htm">otl_refcur_stream<br></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp; select * "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp; from test_tab "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp; where f1&gt;=:f&lt;int,in&gt; and f1&lt;=:f*2; "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "end;", // PL/SQL block returns a referenced cursor<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; db // connect object<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );&nbsp;<br>&nbsp;&nbsp; // create select stream with referenced cursor<br><br>&nbsp; i.set_commit(0); // set stream "auto-commit" to OFF.<br>&nbsp;<br>&nbsp;int f1;<br>&nbsp;unsigned char f2[31];<br><br>&nbsp;<a
 href="otl4_refcur_stream.htm">otl_refcur_stream</a> s; // reference cursor stream for reading rows.<br><br>&nbsp;i&lt;&lt;8; // assigning :f = 8<br>&nbsp;i<a
 href="otl3_stream_class.htm#stream_read_refcur">&gt;&gt;</a>s; // initializing the refrence cursor stream with the output&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // reference cursor.<br><br>&nbsp;while(!s.eof()){ // while not end-of-data<br>&nbsp;  s&gt;&gt;f1;<br> &nbsp; s&gt;&gt;f2;<br> &nbsp; cout&lt;&lt;"f1="&lt;&lt;f1&lt;&lt;", f2=";<br> &nbsp; for(int j=0;f2[j]!=0;++j)<br>     printf("%2x ", f2[j]);<br> &nbsp; cout&lt;&lt;endl;<br>&nbsp;}<br><br>&nbsp;s.close(); // closing the reference cursor<br><br>&nbsp;i&lt;&lt;4; // assigning :f = 4<br>&nbsp;i&gt;&gt;s;<br><br>&nbsp;while(!s.eof()){ // while not end-of-data<br>&nbsp;  s&gt;&gt;f1;<br> &nbsp; s&gt;&gt;f2;<br> &nbsp; cout&lt;&lt;"f1="&lt;&lt;f1&lt;&lt;", f2=";<br> &nbsp; for(int j=0;f2[j]!=0;++j)<br>     printf("%2x ", f2[j]);<br> &nbsp; cout&lt;&lt;endl;<br>&nbsp;}<br>&nbsp;// there is no need to explicitly calls s.close() since s's destructor&nbsp;<br>&nbsp;// will take care of closing the stream<br>}<br><br>int main()<br>{<br>  putenv(const_cast&lt;char*&gt;("NLS_LANG=.AL32UTF8")); // set your Oracle Client NLS_LANG <br>                                // if its default was set to something else<br><br>&nbsp;<a
 href="otl3_connect_class.htm">otl_connect::otl_initialize</a>(); // initialize OCI environment<br>&nbsp;try{<br><br>&nbsp; db.rlogon("scott/tiger"); // connect to Oracle<br><br>&nbsp; <a
 href="otl3_const_sql.htm">otl_cursor::direct_exec<br></a>&nbsp;&nbsp; (<br>&nbsp;&nbsp;&nbsp; db,<br>&nbsp;&nbsp;&nbsp; "drop table test_tab",<br>&nbsp;&nbsp;&nbsp; otl_exception::disabled // disable OTL exceptions<br>&nbsp;&nbsp; ); // drop table<br><br>&nbsp; <a
 href="otl3_const_sql.htm">otl_cursor::direct_exec<br></a>&nbsp;&nbsp; (<br>&nbsp;&nbsp;&nbsp; db,<br>&nbsp;&nbsp;&nbsp; "create table test_tab(f1 number, f2 varchar2(30))"<br>&nbsp;&nbsp;&nbsp; );&nbsp; // create table<br><br>&nbsp; insert(); // insert records into table<br>&nbsp; select(); // select records from table<br><br>&nbsp;}<br><br>&nbsp;catch(<a
 href="otl3_exception_class.htm">otl_exception</a>&amp; p){ // intercept OTL exceptions<br>&nbsp; cerr&lt;&lt;p.msg&lt;&lt;endl; // print out error message<br>&nbsp; cerr&lt;&lt;p.stm_text&lt;&lt;endl; // print out SQL that caused the error<br>&nbsp; cerr&lt;&lt;p.var_info&lt;&lt;endl; // print out the variable that caused the error<br>&nbsp;}<br><br>&nbsp;db.logoff(); // disconnect from Oracle<br><br>&nbsp;return 0;<br><br>}</pre>
<h2>
Output</h2>
<pre>f1=8, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=9, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=10, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=11, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=12, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=13, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=14, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=15, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=16, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=4, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=5, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=6, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=7, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br>f1=8, f2=61 62 63 d0 9e d0 9b d0 ac d0 93 d0 90<br><br><hr
 width="100%"></pre>
<center><a href="otl3_examples.htm">Examples</a> <a href="otl3.htm">Contents</a><a
 href="home.htm">Go
Home</a></center>
<p>Copyright &copy; 1996, 2008, Sergei Kuchin, email: <a
 href="mailto:skuchin@aceweb.com">skuchin@aceweb.com</a>,
<a href="mailto:skuchin@gmail.com">skuchin@gmail.com
<script language="JavaScript">
<!-- hide from old browsers
 var modDate = new Date(document.lastModified)
 document.write("<i> Last Updated:</i> " + (modDate.getMonth()+1) + "/" + 
                modDate.getDate() + "/" + "0"+(modDate.getYear())%100+".");
 //-->
 </script></a>.
</p>
<p><i>Permission to use, copy, modify and redistribute this document
for
any purpose is hereby granted without fee, provided that the above
copyright
notice appear in all copies.</i>
</p>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5456201-1");
pageTracker._trackPageview();
</script>
</body>
</html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久精品免费观看| 午夜精品久久久久久久蜜桃app| 91偷拍与自偷拍精品| 亚洲综合网站在线观看| 精品处破学生在线二十三| 91老师国产黑色丝袜在线| 老司机精品视频一区二区三区| 中文字幕在线不卡| 欧美成人高清电影在线| 欧美日韩久久一区二区| 成人禁用看黄a在线| 精品午夜久久福利影院| 亚洲高清免费视频| 亚洲三级电影网站| 久久久久亚洲蜜桃| 日韩一区二区三区免费观看| 91在线观看下载| 国产毛片精品视频| 美女网站色91| 日韩综合在线视频| 亚洲男人的天堂av| 欧美—级在线免费片| 日韩精品在线看片z| 7777精品久久久大香线蕉| 91色.com| 成人高清免费在线播放| 国产东北露脸精品视频| 国产一区久久久| 久久精品国产99国产| 男女男精品视频| 天天av天天翘天天综合网| 亚洲精品中文在线| 亚洲三级电影全部在线观看高清| 日本一二三不卡| 国产欧美日韩综合精品一区二区| 欧美mv日韩mv亚洲| 精品国产第一区二区三区观看体验| 欧美精品在线视频| 欧美日韩精品一区二区三区四区| 色欧美日韩亚洲| 97se狠狠狠综合亚洲狠狠| 99精品国产99久久久久久白柏| 国产ts人妖一区二区| 成人深夜在线观看| yourporn久久国产精品| 福利91精品一区二区三区| 国产精品一区二区视频| 国产成人精品在线看| 国产成人精品网址| 91在线精品一区二区| 日本电影欧美片| 欧美午夜精品理论片a级按摩| 欧美性色综合网| 欧美精品久久天天躁| 欧美一级国产精品| 精品福利二区三区| 亚洲国产精品成人综合| 综合自拍亚洲综合图不卡区| 日韩理论片网站| 亚洲永久免费av| 天堂资源在线中文精品| 久草这里只有精品视频| 成人精品一区二区三区中文字幕| 91在线播放网址| 欧美性色综合网| 日韩欧美国产综合一区| 国产亚洲精品福利| 亚洲视频在线一区观看| 亚洲成人第一页| 韩国成人精品a∨在线观看| 高清不卡一二三区| 色一情一乱一乱一91av| 777欧美精品| 国产色产综合色产在线视频| 中文字幕av不卡| 亚洲一区二区三区四区在线观看| 日韩精品电影在线| 国产一区二区三区免费播放| 成人蜜臀av电影| 欧美日韩电影一区| 久久日韩精品一区二区五区| 亚洲女爱视频在线| 精品一区二区三区在线视频| 成人天堂资源www在线| 欧美撒尿777hd撒尿| 国产视频一区二区三区在线观看| 亚洲日本乱码在线观看| 蜜乳av一区二区| 一本色道综合亚洲| 欧美电影精品一区二区| 亚洲天堂免费在线观看视频| 麻豆精品视频在线| 91欧美激情一区二区三区成人| 4hu四虎永久在线影院成人| 久久久91精品国产一区二区精品 | 亚洲精品日日夜夜| 免费观看久久久4p| 成人激情免费网站| 日韩精品一区二区三区四区视频| 亚洲激情五月婷婷| 国产综合色视频| 欧美日本在线看| 中文字幕制服丝袜成人av| 日本sm残虐另类| 91在线国产福利| 欧美国产综合一区二区| 蜜臀国产一区二区三区在线播放| 99视频热这里只有精品免费| 精品欧美久久久| 午夜av区久久| 欧美亚洲日本国产| 日韩美女视频一区二区| 国产一区二区三区国产| 制服丝袜中文字幕一区| 一区二区三区资源| 成人app软件下载大全免费| 日韩免费看的电影| 日韩精彩视频在线观看| 99视频国产精品| 国产精品污污网站在线观看 | 色天天综合色天天久久| 亚洲国产精品ⅴa在线观看| 久久99精品久久久久久| 欧美一区二区免费视频| 亚洲一级不卡视频| 欧美综合欧美视频| 国产精品国产自产拍高清av王其| 久久黄色级2电影| 日韩一区二区麻豆国产| 偷偷要91色婷婷| 欧美日韩精品一二三区| 亚洲午夜日本在线观看| 在线一区二区三区四区| 亚洲欧美经典视频| 91蝌蚪国产九色| 亚洲欧洲美洲综合色网| 成人综合婷婷国产精品久久免费| 久久一区二区三区四区| 国产一区二区三区视频在线播放| 亚洲精品一区二区三区蜜桃下载| 免费高清视频精品| 精品国产一区a| 国内精品在线播放| 久久久久亚洲蜜桃| 丁香另类激情小说| 中文字幕中文在线不卡住| 91美女视频网站| 亚洲激情一二三区| 欧美人牲a欧美精品| 亚洲va在线va天堂| 7777精品伊人久久久大香线蕉最新版| 五月天激情小说综合| 日韩亚洲欧美一区二区三区| 精品在线播放午夜| 国产日本一区二区| eeuss国产一区二区三区| 亚洲精品写真福利| 欧美日韩亚洲国产综合| 日本一不卡视频| 久久久av毛片精品| 国产成人精品免费视频网站| 亚洲色图在线看| 欧美日韩精品欧美日韩精品| 久久se精品一区精品二区| 中文字幕成人av| 欧美最猛黑人xxxxx猛交| 蜜臀久久99精品久久久久宅男| 久久久精品中文字幕麻豆发布| 成人ar影院免费观看视频| 亚洲成人免费在线观看| 26uuu精品一区二区在线观看| 成人精品小蝌蚪| 肉色丝袜一区二区| 久久亚洲精华国产精华液 | 成人激情小说网站| 亚洲国产精品嫩草影院| 精品国产不卡一区二区三区| jiyouzz国产精品久久| 日韩精品视频网站| 国产欧美日韩在线观看| 欧美性极品少妇| 国产精品一级片| 亚洲免费观看高清完整版在线 | 精品亚洲国产成人av制服丝袜| 欧洲国内综合视频| 久久精品久久综合| 国产午夜久久久久| 一本色道**综合亚洲精品蜜桃冫| 日韩中文欧美在线| 欧美国产激情一区二区三区蜜月| 91玉足脚交白嫩脚丫在线播放| 亚洲蜜桃精久久久久久久| 欧美裸体bbwbbwbbw| 国产一二精品视频| 中文字幕中文字幕一区二区 | 99精品热视频| 精品一区二区日韩| 中文字幕亚洲一区二区va在线| 欧美日韩一区二区三区视频| 懂色av中文一区二区三区|