锘??xml version="1.0" encoding="utf-8" standalone="yes"?>韩国三级中文字幕hd久久精品,国产农村妇女毛片精品久久,久久精品嫩草影院http://www.shnenglu.com/r2100/zh-cnSun, 11 May 2025 00:24:26 GMTSun, 11 May 2025 00:24:26 GMT60銆宑annot open shared object file銆嶇殑瑙f焙鏂規http://www.shnenglu.com/r2100/archive/2015/12/21/212520.htmlr2100r2100Mon, 21 Dec 2015 03:53:00 GMThttp://www.shnenglu.com/r2100/archive/2015/12/21/212520.htmlhttp://www.shnenglu.com/r2100/comments/212520.htmlhttp://www.shnenglu.com/r2100/archive/2015/12/21/212520.html#Feedback0http://www.shnenglu.com/r2100/comments/commentRss/212520.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/212520.htmlld鍦ㄩ摼鎺ョ殑鏃跺欐壘涓嶅埌鎵闇鐨勫姩鎬佸簱
1銆佸畨瑁呮墍闇鐨勫姩鎬佸簱
2銆佷慨鏀歸摼鎺ユ煡鎵捐礬寰勯厤緗枃浠?浜岄変竴
   a錛夈佸湪鏈塺oot鏉冮檺鎯呭喌涓嬶細
      echo "usr/local/lib >> /etc/ld.so.conf"
   b)銆佸湪娌℃湁root鏉冮檺鐨勬儏鍐典笅錛?br />      $ echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc


ps:鏌ユ壘搴撶殑鏂規硶
$ locate libiconv.so.2
$ whereis libiconv.so.2
$ find /usr /lib -name libiconv.so.2
$ find / -name libiconv.so.2 2>/dev/null







r2100 2015-12-21 11:53 鍙戣〃璇勮
]]>
Dos銆丩inux鐨勬崲琛岀http://www.shnenglu.com/r2100/archive/2015/12/20/212519.htmlr2100r2100Sun, 20 Dec 2015 15:02:00 GMThttp://www.shnenglu.com/r2100/archive/2015/12/20/212519.htmlhttp://www.shnenglu.com/r2100/comments/212519.htmlhttp://www.shnenglu.com/r2100/archive/2015/12/20/212519.html#Feedback0http://www.shnenglu.com/r2100/comments/commentRss/212519.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/212519.htmlWindows: ^M$     CR LF
Linux:   $          LF

瀵逛簬鏂囨湰闂錛屽彲浠ヤ嬌鐢?UNIX2dox銆乨os2UNIX 杞崲

r2100 2015-12-20 23:02 鍙戣〃璇勮
]]>
C++ std::string杞寲涓簊td::wstring 鍜?涓涓猻td::wstring杞寲涓簊td::stringhttp://www.shnenglu.com/r2100/archive/2011/04/06/143544.htmlr2100r2100Wed, 06 Apr 2011 09:58:00 GMThttp://www.shnenglu.com/r2100/archive/2011/04/06/143544.htmlhttp://www.shnenglu.com/r2100/comments/143544.htmlhttp://www.shnenglu.com/r2100/archive/2011/04/06/143544.html#Feedback0http://www.shnenglu.com/r2100/comments/commentRss/143544.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/143544.html 

// 鎶婁竴涓獁string杞寲涓簊tring
std::string& to_string(std::string& dest, std::wstring const & src)
{
   std::setlocale(LC_CTYPE, 
"");

   size_t 
const mbs_len = wcstombs(NULL, src.c_str(), 0);
   std::vector
<char> tmp(mbs_len + 1);
   wcstombs(
&tmp[0], src.c_str(), tmp.size());

   dest.assign(tmp.begin(), tmp.end() 
- 1);

   
return dest;
}

// 鎶婁竴涓猻tring杞寲涓簑string
std::wstring& to_wstring(std::wstring& dest, std::string const & src)
{
   std::setlocale(LC_CTYPE, 
"");

   size_t 
const wcs_len = mbstowcs(NULL, src.c_str(), 0);
   std::vector
<wchar_t> tmp(wcs_len + 1);
   mbstowcs(
&tmp[0], src.c_str(), src.size());

   dest.assign(tmp.begin(), tmp.end() 
- 1);

   
return dest;



r2100 2011-04-06 17:58 鍙戣〃璇勮
]]>
C++涔﹀啓鎷瘋礉鏋勯犲嚱鏁幫紝閲嶈澆璧嬪兼搷浣滅鍜宑lone鍑芥暟闇瑕佹敞鎰忛棶棰?/title><link>http://www.shnenglu.com/r2100/archive/2011/04/06/143514.html</link><dc:creator>r2100</dc:creator><author>r2100</author><pubDate>Wed, 06 Apr 2011 05:18:00 GMT</pubDate><guid>http://www.shnenglu.com/r2100/archive/2011/04/06/143514.html</guid><wfw:comment>http://www.shnenglu.com/r2100/comments/143514.html</wfw:comment><comments>http://www.shnenglu.com/r2100/archive/2011/04/06/143514.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/r2100/comments/commentRss/143514.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/r2100/services/trackbacks/143514.html</trackback:ping><description><![CDATA[<p><br>瀵逛簬C++綾伙細鏄劇ず鍦板啓鍑烘嫹璐濇瀯閫犲嚱鏁幫紝閲嶈澆璧嬪兼搷浣滅鍜屾瀽鏋勫嚱鏁版槸鑹ソ鐨勪範鎯紝浣嗗湪鍐欐瀯閫犲嚱鏁版椂闇瑕佹敞鎰忎竴浜涘鏄撶殑閿欒錛屽涓嬮潰鐨勪唬鐮侊細</p> <p> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> std;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top> <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img id=Codehighlighter1_53_270_Open_Image onclick="this.style.display='none'; Codehighlighter1_53_270_Open_Text.style.display='none'; Codehighlighter1_53_270_Closed_Image.style.display='inline'; Codehighlighter1_53_270_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_53_270_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_53_270_Closed_Text.style.display='none'; Codehighlighter1_53_270_Open_Image.style.display='inline'; Codehighlighter1_53_270_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> M</span><span id=Codehighlighter1_53_270_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_53_270_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img id=Codehighlighter1_72_73_Open_Image onclick="this.style.display='none'; Codehighlighter1_72_73_Open_Text.style.display='none'; Codehighlighter1_72_73_Closed_Image.style.display='inline'; Codehighlighter1_72_73_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_72_73_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_72_73_Closed_Text.style.display='none'; Codehighlighter1_72_73_Open_Image.style.display='inline'; Codehighlighter1_72_73_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    M()</span><span id=Codehighlighter1_72_73_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_72_73_Open_Text><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img id=Codehighlighter1_93_162_Open_Image onclick="this.style.display='none'; Codehighlighter1_93_162_Open_Text.style.display='none'; Codehighlighter1_93_162_Closed_Image.style.display='inline'; Codehighlighter1_93_162_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_93_162_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_93_162_Closed_Text.style.display='none'; Codehighlighter1_93_162_Open_Image.style.display='inline'; Codehighlighter1_93_162_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    M(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> M </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m)</span><span id=Codehighlighter1_93_162_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_93_162_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">copy construtor</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(m);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img id=Codehighlighter1_193_267_Open_Image onclick="this.style.display='none'; Codehighlighter1_193_267_Open_Text.style.display='none'; Codehighlighter1_193_267_Closed_Image.style.display='inline'; Codehighlighter1_193_267_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_193_267_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_193_267_Closed_Text.style.display='none'; Codehighlighter1_193_267_Open_Image.style.display='inline'; Codehighlighter1_193_267_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    M </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> M </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m)</span><span id=Codehighlighter1_193_267_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_193_267_Open_Text><span style="COLOR: #000000">{   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闂鍑哄湪姝ゅ</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">operator =</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top> <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img id=Codehighlighter1_288_340_Open_Image onclick="this.style.display='none'; Codehighlighter1_288_340_Open_Text.style.display='none'; Codehighlighter1_288_340_Closed_Image.style.display='inline'; Codehighlighter1_288_340_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_288_340_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_288_340_Closed_Text.style.display='none'; Codehighlighter1_288_340_Open_Image.style.display='inline'; Codehighlighter1_288_340_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main() </span><span id=Codehighlighter1_288_340_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_288_340_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    M m1;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    M m2;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    m2</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m1;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <p> </p> <p>鍦ㄤ笅闈笁縐嶆儏鍐典笅浼氳皟鐢ㄦ嫹璐濇瀯閫犲嚱鏁幫細</p> <p>(1)鐢ㄤ竴涓凡緇忓疄渚嬪寲浜嗙殑璇ョ被瀵硅薄錛屽幓瀹炰緥鍖栬綾葷殑鍙﹀涓涓璞★紱</p> <p>(2)鐢ㄨ綾葷殑瀵硅薄浼犲肩殑鏂瑰紡浣滀負涓涓嚱鏁扮殑鍙傛暟錛?/p> <p>(3)涓涓嚱鏁拌繑鍥炲間負璇ョ被鐨勪竴涓璞°?/p> <p>鐗瑰埆鍦幫紝瀵逛簬璇彞 M m;  M mm=m; 灞炰簬(1)鎯呭喌錛屽嵆璇彞M mm=m;璋冪敤鐨勬槸鎷瘋礉鏋勯犲嚱鏁幫紝鑰屼笉鏄瀯閫犲嚱鏁般?/p> <p> </p> <p>浣嗗湪閲嶈澆=鎿嶄綔絎︽椂錛岃繑鍥炲間笉鏄紩鐢ㄧ被鍨嬪皢瀵艱嚧紼嬪簭榪愯鍑虹幇涓ラ噸闂銆傚嵆濡傛灉鍑虹幇涓婇潰浼氳皟鐢ㄦ嫹璐濇瀯閫犲嚱鏁扮殑涓夌鎯呭喌涔嬩竴錛屾垨鑰呬嬌鐢?鎿嶄綔絎︽椂錛屾嫹璐濇瀯閫犲嚱鏁板拰operator =灝嗗驚鐜掑綊璋冪敤錛屽鑷寸▼搴忓嚭鐜版寰幆銆傚師鍥犳槸鎷瘋礉鏋勯犲嚱鏁板拰operator =涔嬮棿涓嶆柇鍦伴噸澶嶈皟鐢ㄣ?/p> <p>瑙e喅鍔炴硶錛氬皢operator =鐨勮繑鍥炵被鍨嬫敼涓哄紩鐢ㄧ被鍨婱&錛屾鏃惰皟鐢╫perator =鏃朵笉浼氬幓璋冪敤鎷瘋礉鏋勯犲嚱鏁般?/p> <p> </p> <p>榪樻湁錛岃嫢瑕佸啓clone鏃訛紝鑻ラ氳繃涓嬮潰鐨勬柟寮忥細</p> <p> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_13_71_Open_Image onclick="this.style.display='none'; Codehighlighter1_13_71_Open_Text.style.display='none'; Codehighlighter1_13_71_Closed_Image.style.display='inline'; Codehighlighter1_13_71_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_13_71_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13_71_Closed_Text.style.display='none'; Codehighlighter1_13_71_Open_Image.style.display='inline'; Codehighlighter1_13_71_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span style="COLOR: #000000">    M clone()</span><span id=Codehighlighter1_13_71_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_13_71_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">clone</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <p>鍓嶆彁鏄嫹璐濇瀯閫犲嚱鏁頒笉鑳借皟鐢╟lone鏉ュ畬鎴愭嫹璐濓紝鍚﹀垯鍑虹幇涓婇潰鍚屾牱鐨勯棶棰橈紝涓嬮潰鐨勪唬鐮佸氨浼氬嚭鐜拌繖鏍風殑闂</p> <p>    </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_13_76_Open_Image onclick="this.style.display='none'; Codehighlighter1_13_76_Open_Text.style.display='none'; Codehighlighter1_13_76_Closed_Image.style.display='inline'; Codehighlighter1_13_76_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_13_76_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13_76_Closed_Text.style.display='none'; Codehighlighter1_13_76_Open_Image.style.display='inline'; Codehighlighter1_13_76_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span style="COLOR: #000000">M(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> M </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m)</span><span id=Codehighlighter1_13_76_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_13_76_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">copy construtor</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       clone();<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <p>鎬諱箣錛屽湪鍐欒繖浜涘嚱鏁版椂錛岃鐗瑰埆鐣欐剰褰兼鐨勮皟鐢ㄥ叧緋匯?/p> <p>浠ヤ笅鏄垜鐨勬儻鐢ㄥ啓娉曪細</p> <p>(A)瀵逛簬鎷瘋礉鏋勯犲嚱鏁板拰閲嶈澆=鎿嶄綔絎?/p> <p>  </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_15_84_Open_Image onclick="this.style.display='none'; Codehighlighter1_15_84_Open_Text.style.display='none'; Codehighlighter1_15_84_Closed_Image.style.display='inline'; Codehighlighter1_15_84_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_15_84_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_15_84_Closed_Text.style.display='none'; Codehighlighter1_15_84_Open_Image.style.display='inline'; Codehighlighter1_15_84_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span style="COLOR: #000000">  M(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> M </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m)</span><span id=Codehighlighter1_15_84_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_15_84_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">copy construtor</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(m);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img id=Codehighlighter1_116_215_Open_Image onclick="this.style.display='none'; Codehighlighter1_116_215_Open_Text.style.display='none'; Codehighlighter1_116_215_Closed_Image.style.display='inline'; Codehighlighter1_116_215_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_116_215_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_116_215_Closed_Text.style.display='none'; Codehighlighter1_116_215_Open_Image.style.display='inline'; Codehighlighter1_116_215_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>    M</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> M </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m)</span><span id=Codehighlighter1_116_215_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_116_215_Open_Text><span style="COLOR: #000000">{  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闂鍑哄湪姝ゅ</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">operator =</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img id=Codehighlighter1_170_186_Open_Image onclick="this.style.display='none'; Codehighlighter1_170_186_Open_Text.style.display='none'; Codehighlighter1_170_186_Closed_Image.style.display='inline'; Codehighlighter1_170_186_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_170_186_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_170_186_Closed_Text.style.display='none'; Codehighlighter1_170_186_Open_Image.style.display='inline'; Codehighlighter1_170_186_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>       </span><span id=Codehighlighter1_170_186_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id=Codehighlighter1_170_186_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000"> 姝ゅ鍐欎笂鎴愬憳鏁版嵁鐨勬嫹璐?nbsp;</span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <p>榪欓噷鍐欐垚浜唅nline鍑芥暟錛屽彧鏄柟渚胯鏄庨棶棰橈紝鍏跺疄涓嶅繀闈炶榪欎箞鍐欙紝鍙互閲囧彇鍏堝0鏄庯紝鍚庡畾涔夌殑甯歌鏂規硶銆?/p> <p>(B)瀵逛簬clone鍑芥暟</p> <p>澹版槑錛?nbsp; virtual M clone();   //鑰冭檻緇ф壙鏃剁殑澶氭?/p> <p>瀹氫箟錛?nbsp; </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_12_109_Open_Image onclick="this.style.display='none'; Codehighlighter1_12_109_Open_Text.style.display='none'; Codehighlighter1_12_109_Closed_Image.style.display='inline'; Codehighlighter1_12_109_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_12_109_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_12_109_Closed_Text.style.display='none'; Codehighlighter1_12_109_Open_Image.style.display='inline'; Codehighlighter1_12_109_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span style="COLOR: #000000">M M::clone()</span><span id=Codehighlighter1_12_109_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_12_109_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">clone</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">灝嗗湪璋冪敤澶勭洿鎺ヨ皟鐢ㄦ瀯閫犲嚱鏁幫紝鏁堢巼楂橈紝閬垮厤榪斿洖灞閮ㄥ彉閲忥紝鏇村畨鍏?/span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>       </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> M();<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <p><br> </p> <img src ="http://www.shnenglu.com/r2100/aggbug/143514.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/r2100/" target="_blank">r2100</a> 2011-04-06 13:18 <a href="http://www.shnenglu.com/r2100/archive/2011/04/06/143514.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Reuse Statement Handlehttp://www.shnenglu.com/r2100/archive/2008/09/12/61687.htmlr2100r2100Fri, 12 Sep 2008 08:04:00 GMThttp://www.shnenglu.com/r2100/archive/2008/09/12/61687.htmlhttp://www.shnenglu.com/r2100/comments/61687.htmlhttp://www.shnenglu.com/r2100/archive/2008/09/12/61687.html#Feedback0http://www.shnenglu.com/r2100/comments/commentRss/61687.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/61687.html鑰佹澘瑕佹眰閲嶇敤SQLHSTMT鍙ユ焺錛屾壘鍒頒竴浜涜祫鏂?br>1銆佷嬌鐢⊿QLExecDirect鎵ц浜嗘煡璇㈣鍙ワ紝璁板綍闆嗕細瀛樻斁鍦╤stmt涓紝
2銆侀氳繃SQLBindCol鎶婅褰曢泦鍜屽彉閲忕粦瀹氥?br>3銆丼QLFreeStmt(hstmt, SQL_UNBIND);閲婃斁鐢卞厛鍓嶅姝よ鍙ュ彞鏌勮繘琛岀殑 SQLBindCol() 璋冪敤緇戝畾鐨勬墍鏈夊垪錛堝簲鐢ㄧ▼搴忓彉閲忔垨鏂囦歡寮曠敤涓庣粨鏋滈泦鍒椾箣闂寸殑鍏寵仈灝嗘柇寮錛夈?br>4銆丼QLCloseCursor(hstmt);灝嗗叧闂換浣曚笌璇彞鍙ユ焺鐩稿叧鑱旂殑娓告爣騫跺簾寮冧換浣曟殏鎸傜粨鏋?br>
濡傛灉涓嶉渶瑕佷嬌鐢ㄨ繑鍥炵殑緇撴灉闆?br>1銆佷嬌鐢⊿QLExecDirect鎵ц浜嗘煡璇㈣鍙ワ紝璁板綍闆嗕細瀛樻斁鍦╤stmt涓紝
2銆丼QLCloseCursor(hstmt)鎴栬匰QLFreeStmt(hstmt,SQL_CLOSE )灝嗗叧闂換浣曚笌璇彞鍙ユ焺鐩稿叧鑱旂殑娓告爣騫跺簾寮冧換浣曟殏鎸傜粨鏋?br>






r2100 2008-09-12 16:04 鍙戣〃璇勮
]]>
http://msdn.microsoft.com/en-us/library/ms716303(VS.85).aspxhttp://www.shnenglu.com/r2100/archive/2008/09/11/61570.htmlr2100r2100Thu, 11 Sep 2008 03:31:00 GMThttp://www.shnenglu.com/r2100/archive/2008/09/11/61570.htmlhttp://www.shnenglu.com/r2100/comments/61570.htmlhttp://www.shnenglu.com/r2100/archive/2008/09/11/61570.html#Feedback2http://www.shnenglu.com/r2100/comments/commentRss/61570.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/61570.htmlSQLExecDirect鍑芥暟婧愪唬鐮?/span>
static SQLRETURN
ODBCExecDirect(ODBCStmt 
*stmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStr)
{
    
char *query;
    MapiMsg ret;
    MapiHdl hdl;

    hdl 
= stmt->hdl;

    
if (stmt->State >= EXECUTED1 || (stmt->State == EXECUTED0 && mapi_more_results(hdl))) {
        
/* Invalid cursor state */
        addStmtError(stmt, 
"24000", NULL, 0);
        
return SQL_ERROR;
    }

    
/* TODO: convert ODBC escape sequences ( {d 'value'} or {t 'value'} or
       {ts 'value'} or {escape 'e-char'} or {oj outer-join} or
       {fn scalar-function} etc. ) to MonetDB SQL syntax 
*/
    query 
= ODBCTranslateSQL(szSqlStr, (size_t) nSqlStr, stmt->noScan);

    ODBCResetStmt(stmt);

#ifdef ODBCDEBUG
    ODBCLOG(
"SQLExecDirect: \"%s\"\n", query);
#endif

    ret 
= mapi_query_handle(hdl, query);
    free(query);
    
switch (ret) {
    
case MOK:
        
break;
    
case MTIMEOUT:
        
/* Communication link failure */
        addStmtError(stmt, 
"08S01", mapi_error_str(stmt->Dbc->mid), 0);
        
return SQL_ERROR;
    
default:
        
/* General error */
        addStmtError(stmt, 
"HY000", mapi_error_str(stmt->Dbc->mid), 0);
        
return SQL_ERROR;
    }

    
/* now get the result data and store it to our internal data structure */

    
return ODBCInitResult(stmt);
}

As mentioned earlier, it is more efficient to reuse statements than to drop them and allocate new ones. Before executing a new SQL statement on a statement, applications should be sure that the current statement settings are appropriate. These include statement attributes, parameter bindings, and result set bindings. Generally, parameters and result sets for the old SQL statement need to be unbound (by calling SQLFreeStmt with the SQL_RESET_PARAMS and SQL_UNBIND options) and rebound for the new SQL statement.

When the application has finished using the statement, it calls SQLFreeHandle to free the statement. After freeing the statement, it is an application programming error to use the statement's handle in a call to an ODBC function; doing so has undefined but probably fatal consequences.

When SQLFreeHandle is called, the driver releases the structure used to store information about the statement.

SQLDisconnect automatically frees all statements on a connection.


         
/**********************************************
 * ODBCStmt.c
 *
 * Description:
 * This file contains the functions which operate on
 * ODBC statement structures/objects (see ODBCStmt.h).
 *
 * Author: Martin van Dinther
 * Date  : 30 aug 2002
 *
 *********************************************
*/

#include 
"ODBCGlobal.h"
#include 
"ODBCStmt.h"

#define ODBC_STMT_MAGIC_NR  5461    /* for internal sanity check only */


/*
 * Creates a new allocated ODBCStmt object and initializes it.
 *
 * Precondition: none
 * Postcondition: returns a new ODBCStmt object
 
*/
ODBCStmt 
*
newODBCStmt(ODBCDbc 
*dbc)
{
    ODBCStmt 
*stmt = (ODBCStmt *) malloc(sizeof(ODBCStmt));
    assert(stmt);

    assert(dbc);
    assert(dbc
->mid);

    
if (stmt == NULL) {
        
/* Memory allocation error */
        addDbcError(dbc, 
"HY001", NULL, 0);
        
return NULL;
    }

    stmt
->Dbc = dbc;
    stmt
->Error = NULL;
    stmt
->RetrievedErrors = 0;

    stmt
->State = INITED;
    stmt
->hdl = mapi_new_handle(dbc->mid);
    
if (stmt->hdl == NULL) {
        
/* Memory allocation error */
        addDbcError(dbc, 
"HY001", NULL, 0);
        free(stmt);
        
return NULL;
    }
    assert(stmt
->hdl);

    stmt
->currentRow = 0;
    stmt
->startRow = 0;
    stmt
->rowSetSize = 0;
    stmt
->queryid = -1;
    stmt
->nparams = 0;
    stmt
->querytype = -1;
    stmt
->rowcount = 0;

    
/* add this stmt to the administrative linked stmt list */
    stmt
->next = dbc->FirstStmt;
    dbc
->FirstStmt = stmt;

    stmt
->cursorType = SQL_CURSOR_FORWARD_ONLY;
    stmt
->cursorScrollable = SQL_NONSCROLLABLE;
    stmt
->retrieveData = SQL_RD_ON;
    stmt
->noScan = SQL_NOSCAN_OFF;

    stmt
->ApplRowDescr = newODBCDesc(dbc);
    stmt
->ApplParamDescr = newODBCDesc(dbc);
    stmt
->ImplRowDescr = newODBCDesc(dbc);
    stmt
->ImplParamDescr = newODBCDesc(dbc);
    stmt
->AutoApplRowDescr = stmt->ApplRowDescr;
    stmt
->AutoApplParamDescr = stmt->ApplParamDescr;

    
if (stmt->ApplRowDescr == NULL || stmt->ApplParamDescr == NULL || stmt->ImplRowDescr == NULL || stmt->ImplParamDescr == NULL) {
        destroyODBCStmt(stmt);
        
return NULL;
    }

    stmt
->ApplRowDescr->sql_desc_alloc_type = SQL_DESC_ALLOC_AUTO;
    stmt
->ApplParamDescr->sql_desc_alloc_type = SQL_DESC_ALLOC_AUTO;
    stmt
->ImplRowDescr->sql_desc_alloc_type = SQL_DESC_ALLOC_AUTO;
    stmt
->ImplParamDescr->sql_desc_alloc_type = SQL_DESC_ALLOC_AUTO;
    stmt
->ImplRowDescr->Stmt = stmt;
    stmt
->ImplParamDescr->Stmt = stmt;

    stmt
->Type = ODBC_STMT_MAGIC_NR;    /* set it valid */

    
return stmt;
}

SQLFreeHandle
ODBCFreeStmt_(ODBCStmt 
*stmt)
{
    
/* check if statement is not active */
    
if (stmt->State >= EXECUTED0) {
        
/* should be closed first */
        
if (SQLFreeStmt_(stmt, SQL_CLOSE) == SQL_ERROR)
            
return SQL_ERROR;
    }

    
/* Ready to destroy the stmt handle */
    destroyODBCStmt(stmt);
    
return SQL_SUCCESS;
}


SQLFreeStmt

SQLFreeStmt_(ODBCStmt 
*stmt, SQLUSMALLINT option)
{
    
switch (option) {
    
case SQL_CLOSE:
        
/* Note: this option is also called from SQLCancel() and
           SQLCloseCursor(), so be careful when changing the code 
*/
        
/* close cursor, discard result set, set to prepared */
        setODBCDescRecCount(stmt
->ImplRowDescr, 0);
        stmt
->currentRow = 0;
        stmt
->startRow = 0;
        stmt
->rowSetSize = 0;

        
if (stmt->State == EXECUTED0)
            stmt
->State = stmt->queryid >= 0 ? PREPARED0 : INITED;
        
else if (stmt->State >= EXECUTED1)
            stmt
->State = stmt->queryid >= 0 ? PREPARED1 : INITED;

        
/* Important: do not destroy the bind parameters and columns! */
        
return SQL_SUCCESS;
    
case SQL_DROP:
        
return ODBCFreeStmt_(stmt);
    
case SQL_UNBIND:
        setODBCDescRecCount(stmt
->ApplRowDescr, 0);
        
return SQL_SUCCESS;
    
case SQL_RESET_PARAMS:
        setODBCDescRecCount(stmt
->ApplParamDescr, 0);
        setODBCDescRecCount(stmt
->ImplParamDescr, 0);
        mapi_clear_params(stmt
->hdl);
        
return SQL_SUCCESS;
    
default:
        
/* Invalid attribute/option identifier */
        addStmtError(stmt, 
"HY092", NULL, 0);
        
return SQL_ERROR;
    }

    
/* not reached */
}

SQLHSTMT鐨勭粨鏋?br>typedef struct tODBCDRIVERSTMT {
    
/* Stmt properties */
    
int Type;        /* structure type, used for handle validy test */
    ODBCError 
*Error;    /* pointer to an Error object or NULL */
    
int RetrievedErrors;    /* # of errors already retrieved by SQLError */
    ODBCDbc 
*Dbc;        /* Connection context */
    
struct tODBCDRIVERSTMT *next;    /* the linked list of stmt's in this Dbc */
    
enum StatementState State;    /* needed to detect invalid cursor state */
    MapiHdl hdl;

    unsigned 
int rowcount;    /* # affected rows */

    
/* startRow is the row number of first row in the result
       set (0 based); rowSetSize is the number of rows in the
       current result set; currentRow is the row number of the
       current row within the current result set 
*/
    unsigned 
int currentRow;
    unsigned 
int startRow;
    unsigned 
int rowSetSize;

    unsigned 
int currentCol; /* used by SQLGetData() */
    SQLINTEGER retrieved;    
/* amount of data retrieved */
    
int queryid;        /* the query to be executed */
    
int nparams;        /* the number of parameters expected */

    
int querytype;        /* query type as returned by server */

    SQLUINTEGER cursorType;
    SQLUINTEGER cursorScrollable;
    SQLUINTEGER retrieveData;
    SQLUINTEGER noScan;

    ODBCDesc 
*ApplRowDescr;    /* Application Row Descriptor (ARD) */
    ODBCDesc 
*ApplParamDescr; /* Application Parameter Descriptor (APD) */
    ODBCDesc 
*ImplRowDescr;    /* Implementation Row Descriptor (IRD) */
    ODBCDesc 
*ImplParamDescr; /* Implementation Parameter Descriptor (IPD) */

    ODBCDesc 
*AutoApplRowDescr; /* Auto-allocated ARD */
    ODBCDesc 
*AutoApplParamDescr; /* Auto-allocated APD */

    
/* Stmt children: none yet */
} ODBCStmt;








r2100 2008-09-11 11:31 鍙戣〃璇勮
]]>
DOM璧勬枡http://www.shnenglu.com/r2100/archive/2008/02/26/43295.htmlr2100r2100Tue, 26 Feb 2008 13:12:00 GMThttp://www.shnenglu.com/r2100/archive/2008/02/26/43295.htmlhttp://www.shnenglu.com/r2100/comments/43295.htmlhttp://www.shnenglu.com/r2100/archive/2008/02/26/43295.html#Feedback0http://www.shnenglu.com/r2100/comments/commentRss/43295.htmlhttp://www.shnenglu.com/r2100/services/trackbacks/43295.html

Dom Programming Guid: 錛圓pache錛?/strong>http://www.slac.stanford.edu/exp/glast/ground/software/extDoc/xerces/2_6_0/doc/program-dom.html#validation-dynamic

Java涓嶺ML鑱斿悎緙栫▼涔婦OM綃囷細http://kimmyzhang.zhmy.com/archives/2006/9579.shtml

DOM鍒濇鍙妀dom鐨勪粙緇?/strong>錛?a >http://www.xml.org.cn/dispbbs.asp?boardID=11&ID=37000

DOM鐨勪竴浜涗粙緇?/strong>錛?a >http://blog.sina.com.cn/u/57db2a730100037i

鐢╔erces鎿嶄綔XML鏂囨。錛?/strong>http://blog.sina.com.cn/u/57db2a73010002p5

浣跨敤 Xerces-C++ 緙撳瓨鍜屽簭鍒楀寲 XML 妯″紡錛?/strong>http://www-128.ibm.com/developerworks/cn/xml/x-xsdxerc.html

鍏呭垎鍒╃敤 Xerces-C++錛岀 1 閮ㄥ垎錛?/font>http://www-128.ibm.com/developerworks/cn/xml/x-xercc/

鍏呭垎鍒╃敤 Xerces-C++錛岀 1 閮ㄥ垎錛?a >http://www-128.ibm.com/developerworks/cn/xml/x-xercc2/


鎶宸? 濡備綍鍒╃敤Xerces C++姝g‘澶勭悊XML鏂囨。涓殑WhiteSpaceL錛?/span>http://www-128.ibm.com/developerworks/cn/xml/tips/x-xercesc2/

嫻呰皥鍒╃敤Xerces C++瑙f瀽XML鏂囨。
http://hi.baidu.com/fx0517/blog/item/258f12d53c32c6c451da4bb3.html


apache xerces c++ windows 涓嬬紪璇戜笌vc6瀹炰緥 

http://blog.csdn.net/smq65/archive/2006/09/04/1174368.aspx



r2100 2008-02-26 21:12 鍙戣〃璇勮
]]>
error LNK2005: http://www.shnenglu.com/r2100/archive/2008/01/31/42269.htmlr2100r2100Thu, 31 Jan 2008 01:52:00 GMThttp://www.shnenglu.com/r2100/archive/2008/01/31/42269.html

r2100 2008-01-31 09:52 鍙戣〃璇勮
]]>
欧美日韩精品久久久久| 午夜精品久久久久久久久| 99久久99这里只有免费费精品| 久久久精品人妻一区二区三区四| 99久久免费国产精品热| 精品一久久香蕉国产线看播放| 久久人人超碰精品CAOPOREN| 色婷婷综合久久久久中文| 久久精品国产清自在天天线| 婷婷五月深深久久精品| 日韩美女18网站久久精品| 久久婷婷五月综合97色| 欧美大战日韩91综合一区婷婷久久青草| 久久久久免费精品国产| 久久久精品视频免费观看| 精品久久久久久无码专区不卡| 亚洲人成无码www久久久| 国产亚洲精品自在久久| 久久久久久伊人高潮影院| 久久精品人妻一区二区三区| 久久美女人爽女人爽| 久久99精品久久久久子伦| 久久久久久精品免费看SSS| 日本国产精品久久| 欧美亚洲日本久久精品| 精品久久久久久99人妻| 国内精品伊人久久久久| 久久亚洲AV成人无码国产| 久久午夜夜伦鲁鲁片免费无码影视| 久久九九久精品国产| 精品国产综合区久久久久久| 国产一区二区精品久久岳| 久久精品国产99久久丝袜| 久久男人中文字幕资源站| 精品人妻伦九区久久AAA片69 | 欧美午夜精品久久久久久浪潮| 久久精品成人国产午夜| 国产精品99久久久久久www| 久久精品国产黑森林| 久久久精品久久久久影院| 久久久久亚洲AV无码观看|