锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲图片在线观看,亚洲91精品麻豆国产系列在线,久久久国产精品亚洲一区http://www.tkk7.com/yuanhuaming/category/2773.html鏃犺鏄壒璇勭殑錛岃禐鎵殑錛屾寚鐫鐨勯兘璇稥MAIL緇欐垜錛屼綘鐨勫緩璁皢鏄垜鍓嶈繘鐨勫姩鍔? <A href=mailto:yuanhuaming@56.com >鑱旂郴鎴?lt;/A>zh-cnFri, 02 Mar 2007 07:42:05 GMTFri, 02 Mar 2007 07:42:05 GMT60ActiveReport涔嬩簨浠剁瘒 http://www.tkk7.com/yuanhuaming/archive/2006/08/03/61492.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Thu, 03 Aug 2006 05:16:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2006/08/03/61492.htmlhttp://www.tkk7.com/yuanhuaming/comments/61492.htmlhttp://www.tkk7.com/yuanhuaming/archive/2006/08/03/61492.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/61492.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/61492.html 1.聽聽聽聽聽聽 鍙Е鍙戜竴嬈$殑浜嬩歡錛?/span>

ReportStart 錛?/span> 鍦ㄦ姤琛ㄥ惎鍔ㄦ椂瑙﹀彂銆傝浜嬩歡鍦?/span> DataInitialize 涔嬪墠錛屽湪榪欓噷鍙互鏁翠釜鎶ヨ〃閮借鐢ㄥ埌鐨勫璞℃垨鍙橀噺浣滃垵濮嬪寲錛屼篃鍙互璁劇疆瀛愭姤琛ㄣ?/span>

DataInitialize 錛氳繖涓簨浠跺湪鍓嶉潰鐨勫嚑綃囬殢絎斾腑緇忓父鍑虹幇錛岀粡甯稿湪榪欓噷鍙栨暟鎹紝緇戝畾鏁版嵁婧愶紝璁劇疆鎶ヨ〃鐨?/span> Fileds 灞炴х瓑銆?/span>

ReportEnd 錛?/span> 鍦ㄦ姤琛ㄥ姞杞藉畬鎴愬悗瑙﹀彂銆?/span>

2.聽聽聽聽聽聽 澶氭瑙﹀彂鐨勪簨浠訛細

FetchData 錛? 鍦ㄥ鐞嗘瘡涓鏉℃暟鎹椂閮戒細瑙﹀彂錛屽鏋滄槸閲囩敤緇戝畾鏁版嵁婧愮殑鏂瑰紡錛屽氨涓嶉渶瑕佸啀浣滃 Fields 涓瘡涓?/span> Field 鐨?/span> Value 璧嬪箋傚鏋滄槸浠庤嚜瀹氫箟鐨勫璞¢泦鍚堜腑鎻愬彇鏁版嵁錛屽氨瑕佸湪榪欓噷緇?/span> Fields 璧嬪箋傝屼笖錛屼嬌鐢ㄨ嚜瀹氫箟闆嗗悎鐨勬椂鍊欒鑷繁璁劇疆浜嬩歡鐨?/span> eArgs 鍙傛暟鐨?/span> EOF 灞炴э紝璇ュ睘鎬х敤鏉ュ垽鏂槸鍚︽樉紺哄埌浜嗘渶鍚庝竴鏉¤褰曪紝濡傛灉鏄紝灝辮緗負 true 錛屽茍涓旂洿鎺ヨ繑鍥炪傚叿浣撶殑浠g爜鍙互鍙傜湅浠ュ墠鐨勯殢絎斻?/span>

PageStart 錛?/span> 鍦ㄦ姤琛ㄧ殑姣忛〉鐢熸垚鐨勬椂鍊欒Е鍙戯紝鍦ㄨ繖閲屼綔閽堝姣忎釜欏電殑澶勭悊錛屾渶甯歌鐨勫氨鏄樉紺洪〉鐮併?/span>

PageEnd 錛?/span> 鍦ㄦ姤琛ㄧ殑姣忎篃鐢熸垚瀹屾垚鐨勬椂鍊欒Е鍙戙?/span>

3.聽聽聽聽聽聽 鍖哄煙鐨勪簨浠訛細

姣忎釜鍖哄煙錛?/span> PageHeader 錛?/span> Detail 錛?/span> PageFooter 錛夐兘鏈?/span> Format 錛?/span> BeforePrint 鍜?/span> AfterPrint 浜嬩歡銆傛渶濂戒笉瑕佸湪榪欏嚑涓簨浠朵腑鎿嶄綔鎶ヨ〃鐨?/span> Fields 闆嗗悎錛岃屽簲璇ュ湪 DataInitialize 鍜?/span> FetchData 涓繘琛屻?/span>

Format 錛?/span> 鍦ㄦ暟鎹姞杞藉茍緇戝畾鍚庤Е鍙戯紝鍙湁鍦ㄨ繖閲屾墠鍙互璁劇疆鏌愪釜鍖哄煙鐨勯珮搴︺?/span>

BeforePrint 錛?/span> 鍦ㄥ尯鍩熻鐢熸垚鍓嶈Е鍙戯紝鍦ㄨ繖閲屽鏋滆緗尯鍩熺殑楂樺害鏄笉浼氭湁鏁堟灉鐨勶紝鑰屼笖涓嶈鍦ㄨ繖閲屾搷浣滄暟鎹簮銆?/span>

AfterPrint 錛?/span> 鍦ㄥ尯鍩熷凡緇忚鐢熸垚騫舵弿鐢誨嚭鍚庡彂鐢燂紝鍙互鍦ㄨ浜嬩歡閲岀洿鎺ュ湪鐢誨竷涓婅繘琛屾弿鐢繪搷浣溿?/span>

]]>
鍦ㄥ啓紼嬪簭鐨勬椂鍊欙紝璇鋒敞鎰忕壒孌婂瓧絎︾殑杞箟~~~http://www.tkk7.com/yuanhuaming/archive/2006/07/19/58936.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Wed, 19 Jul 2006 02:51:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2006/07/19/58936.htmlhttp://www.tkk7.com/yuanhuaming/comments/58936.htmlhttp://www.tkk7.com/yuanhuaming/archive/2006/07/19/58936.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/58936.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/58936.html鍓嶅ぉ琚祴璇曠粍鏌ュ嚭鏉ョ殑涓涓狟UG錛屽氨鏄湪杈撳叆"'"鐨勬椂鍊欐姤閿欎簡銆傚洜涓烘暟鎹簱鏄疧RACLE錛?鏄叧閿瓧錛屾墍浠ユ姏浜嗗紓甯搞?br />
瑙e喅鏂規硶錛?br />1.鍙互鍏堥緙栬瘧涓?
2.灝辨槸杞箟涓?string.replace("'" ,"''")

鎴戣涓鴻繖涓狟UG鍑虹殑濂?鏄犲儚姣旇緝娣卞埢.鍦ㄤ粖鍚庣殑寮鍙戣繃紼嬩腑,鍦ㄨ漿涔夋柟闈㈢暀浜嗕竴涓績鐪?





]]>
澶氭湰紼嬪簭鍚屾椂鍐橪OG鍑虹幇鐨勯棶棰?/title><link>http://www.tkk7.com/yuanhuaming/archive/2006/07/19/58919.html</link><dc:creator>鐤祦鎴愭?/dc:creator><author>鐤祦鎴愭?/author><pubDate>Wed, 19 Jul 2006 02:16:00 GMT</pubDate><guid>http://www.tkk7.com/yuanhuaming/archive/2006/07/19/58919.html</guid><wfw:comment>http://www.tkk7.com/yuanhuaming/comments/58919.html</wfw:comment><comments>http://www.tkk7.com/yuanhuaming/archive/2006/07/19/58919.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/yuanhuaming/comments/commentRss/58919.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/yuanhuaming/services/trackbacks/58919.html</trackback:ping><description><![CDATA[ <p>緇撳悎嫻嬭瘯鐨勬椂鍊欏伓灝斾細鍑虹幇錛氥儘銉冦儓銉兗銈?銉戙偣銇岃銇ゃ亱銈娿伨銇涖倱銆?br />鎴戜滑涓寮濮嬮兘浠ヤ負鏄綉緇滅殑闂錛屼絾鏄竴鐩撮兘瑙e喅涓嶄簡銆?br />浠婂ぉ鏌愪漢鏃犺亰嫻嬭瘯LOG鐨勬椂鍊欙紝鐪熺浉緇堜簬姘磋惤鐭沖嚭浜嗐?br />嫻嬭瘯鐜錛歸in2000錛?鏈彧鍐橪OG鐨勭▼搴忋?br />褰?鏈▼搴忓悓鏃跺啓LOG鍒頒竴涓棩蹇椾腑鐨勬椂鍊欎細鍑虹幇涓婅瘔ERROR銆?br /><br />璁╀漢寰堟剰澶栵紝鍐橪OG灞呯劧鎶ョ綉緇滆礬寰勬壘涓嶅埌銆傜粡楠屽煎張涓婂崌浜?br /><br /><br /><br /><br /><br /></p> <img src ="http://www.tkk7.com/yuanhuaming/aggbug/58919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/yuanhuaming/" target="_blank">鐤祦鎴愭?/a> 2006-07-19 10:16 <a href="http://www.tkk7.com/yuanhuaming/archive/2006/07/19/58919.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>.net甯哥敤鍑芥暟http://www.tkk7.com/yuanhuaming/archive/2006/06/16/53154.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Fri, 16 Jun 2006 01:21:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2006/06/16/53154.htmlhttp://www.tkk7.com/yuanhuaming/comments/53154.htmlhttp://www.tkk7.com/yuanhuaming/archive/2006/06/16/53154.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/53154.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/53154.htmlVal(string) 灝嗕唬琛ㄦ暟瀛楃殑瀛楃涓茶漿鎹負鏁板煎瀷鎬侊紝鑻ュ瓧絎︿覆涓惈鏈夐潪鏁板瓧鐨勫唴瀹瑰垯浼氬皢鍏跺幓闄ゅ悗錛屽悎騫朵負涓鏁板瓧銆?
Weekday(date) 鍙栫殑鍙傛暟涓殑鏃ユ湡鏄竴涓槦鏈熺殑絎嚑澶╋紝鏄熸湡澶╀負1銆佹槦鏈熶竴涓?銆佹槦鏈熶簩涓? 渚濇綾繪帹銆?
WeekDayName(number) 渚濇帴鏀剁殑鍙傛暟鍙栧緱鏄熸湡鐨勫悕縐幫紝鍙帴鏀剁殑鍙傛暟涓? 鍒?錛屾槦鏈熷ぉ涓?銆佹槦鏈熶竴涓?銆佹槦鏈熶簩涓? 渚濇綾繪帹銆?
Split(expression[, delimiter]) 浠elimiter 鍙傛暟璁懼畾鐨勬潯浠跺瓧絎︿覆鏉ュ皢瀛楃涓插垎鍓蹭負瀛楃涓叉暟緇勩?
Sqrt(number) 鍙栧緱涓鏁板煎緱騫蟲柟鏍廣?
Str(number) 灝嗘暟瀛楄漿涓哄瓧絎︿覆鍚庝紶鍥炪?
StrReverse(expression) 鍙栧緱瀛楃涓插唴瀹瑰弽杞悗鐨勭粨鏋溿?
Tan(number) 鍙栧緱鏌愪釜瑙掑害鐨勬鍒囧箋?
TimeOfDay() 鍙栧緱鐩墠涓嶅寘鍚棩鏈熺殑鏃墮棿銆?
Timer() 鍙栧緱鐢?:00 鍒扮洰鍓嶆椂闂寸殑縐掓暟錛屽瀷鎬佷負Double銆?
TimeSerial(hour, minute, second) 灝嗘帴鏀剁殑鍙傛暟鍚堝茍涓轟竴涓彧鏈夋椂闂碊ate 鍨嬫佺殑鏁版嵁銆?
Timavalue(time) 鍙栧緱絎﹀悎鍥藉埆璁懼畾鏍峰紡鐨勬椂闂村箋?
Today() 鍙栧緱浠婂ぉ涓嶅寘鍚椂闂寸殑鏃ユ湡銆?
Trim(string) 鍘繪帀瀛楃涓插紑澶村拰緇撳熬鐨勭┖鐧姐?
TypeName(varname) 鍙栧緱鍙橀噺鎴栧璞$殑鍨嬫併?
Ubound(arrayname[, dimension]) 鍙栧緱鏁扮粍鐨勬渶緇堢儲寮曞鹼紝dimension 鍙傛暟鏄寚瀹氬彇寰楃鍑犵淮搴︾殑鏈緇堢儲寮曞箋?
MonthName(month) 渚濇帴鏀剁殑鏈堜喚鏁板煎彇寰楄鏈堜喚鐨勫畬鏁村啓娉曘?
Now() 鍙栧緱鐩墠鐨勬棩鏈熷拰鏃墮棿銆?
Oct(number) 灝嗘暟鍊煎弬鏁拌漿鎹負8 榪涘埗鍊箋?
Replace(expression, find, replace) 灝嗗瓧絎︿覆涓璮ind 鍙傛暟鎸囧畾鐨勫瓧絎︿覆杞崲涓簉eplace 鍙傛暟鎸囧畾鐨勫瓧絎︿覆銆?
Right(string,length) 鐢卞瓧絎︿覆鍙寵竟寮濮嬪彇寰條ength 鍙傛暟璁懼畾闀垮害鐨勫瓧絎︺?
RmDir(path) 縐婚櫎涓涓┖鐨勭洰褰曘?
Rnd() 鍙栧緱浠嬩簬0 鍒? 涔嬮棿鐨勫皬鏁幫紝濡傛灉姣忔閮借鍙栧緱涓嶅悓鐨勫鹼紝浣跨敤鍓嶉渶鍔犱笂Randomize 鍙欒堪銆?
Rtrim(string) 鍘繪帀瀛楃涓茬殑鍙寵竟絀虹櫧閮ㄥ垎銆?
Second(time) 鍙栧緱鏃墮棿鍐呭鐨勭閮ㄥ垎錛屽瀷鎬佷負Integer銆?
Sign(number) 鍙栧緱鏁板煎唴瀹規槸姝f暟鎴栬礋鏁幫紝姝f暟浼犲洖1錛岃礋鏁頒紶鍥?1錛? 浼犲洖0銆?
Sin(number) 鍙栧緱涓涓搴︾殑姝e雞鍊箋?
Space(number) 鍙栧緱number 鍙傛暟璁懼畾鐨勭┖鐧藉瓧絎︿覆銆?
IsDate(expression) 鍒ゆ柇琛ㄨ揪寮忓唴瀹規槸鍚︿負DateTime 鍨嬫侊紝鑻ユ槸鍒欎紶鍥濼rue錛屽弽涔嬪垯涓篎alse銆?
IsDbNull(expression) 鍒ゆ柇琛ㄨ揪寮忓唴瀹規槸鍚︿負Null錛岃嫢鏄垯浼犲洖True錛屽弽涔嬪垯涓篎alse銆?
IsNumeric(expression) 鍒ゆ柇琛ㄨ揪寮忓唴瀹規槸鍚︿負鏁板煎瀷鎬侊紝鑻ユ槸鍒欎紶鍥濼rue錛屽弽涔嬪垯涓篎alse銆?
Join(sourcearray[, delimiter]) 灝嗗瓧絎︿覆鏁扮粍鍚堝茍鍞竴涓瓧絎︿覆錛宒elimiter 鍙傛暟鏄瀹氬湪鍚勪釜鍏冪礌闂村姞鍏ユ柊鐨勫瓧絎︿覆銆?
Lcase(string) 灝嗗瓧絎︿覆杞崲涓哄皬鍐欏瓧浣撱?
Left(string, length) 鐢卞瓧絎︿覆宸﹁竟寮濮嬪彇寰條ength 鍙傛暟璁懼畾闀垮害鐨勫瓧絎︺?
Len(string) 鍙栧緱瀛楃涓茬殑闀垮害銆?
Log(number) 鍙栧緱鏁板肩殑鑷劧瀵規暟銆?
Ltrim(string) 鍘繪帀瀛楃涓茬殑宸﹁竟絀虹櫧閮ㄥ垎銆?
Mid(string, start[, length]) 鍙栧嚭瀛楃涓蹭腑strat 鍙傛暟璁懼畾鐨勫瓧絎﹀悗length 闀垮害鐨勫瓧絎︿覆錛岃嫢length 鍙傛暟娌℃湁璁懼畾錛屽垯鍙栧洖start 浠ュ悗鍏ㄩ儴鐨勫瓧絎︺?
Minute(time) 鍙栧緱鏃墮棿鍐呭鐨勫垎閮ㄥ垎錛屽瀷鎬佷負Integer銆?
MkDir(path) 寤虹珛涓涓柊鐨勭洰褰曘?
Month(date) 鍙栧緱鏃ユ湡鐨勬湀閮ㄥ垎錛屽瀷鎬佷負Integer銆?
FormatDateTime(date[,namedformat]) 浼犲洖鏍煎紡鍖栫殑鏃ユ湡鎴栨椂闂存暟鎹?
FormatNumber(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 浼犲洖鏍煎紡鍖?
鐨勬暟鍊兼暟鎹侼umdigitsafterdecimal 鍙傛暟涓哄皬鏁板瓧鏁幫紝includeleadingdigit 鍙傛暟涓哄綋鏁存暟涓? 鏃舵槸鍚﹁ˉ鑷蟲暣鏁板瓧鏁般?
FormatPercent(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 浼犲洖杞崲涓虹櫨鍒嗘瘮鏍煎紡鐨勬暟鍊兼暟鎹俷umdigitsafterdecimal 鍙傛暟涓哄皬鏁板瓧鏁幫紝includeleadingdigit 鍙傛暟涓哄綋鏁存暟涓? 鏃舵槸鍚﹁ˉ鑷蟲暣鏁板瓧鏁般?
GetAttr(filename) 浼犲洖妗f鎴栫洰褰曠殑灞炴у箋?
Hex(number) 灝嗘暟鍊煎弬鏁拌漿鎹負16 榪涘埗鍊箋?
Hour(time) 浼犲洖鏃墮棿鐨勫皬鏃跺瓧孌碉紝鍨嬫佹槸Integer銆?
Iif(expression, truepart, falsepart) 褰撹〃杈懼紡鐨勪紶鍥炲間負True 鏃舵墽琛宼ruepart 瀛楁鐨勭▼搴忥紝鍙嶄箣鍒欐墽琛宖alsepart 瀛楁銆?
InStr([start, ]string1, string2) 鎼滃string2 鍙傛暟璁懼畾鐨勫瓧絎﹀嚭鐜板湪瀛楃涓茬殑絎嚑涓瓧絎︼紝start 涓虹敱絎嚑涓瓧絎﹀紑濮嬪鎵撅紝string1 涓烘鎼滃鐨勫瓧絎︿覆錛宻tring2 涓烘鎼滃鐨勫瓧絎︺?
Int(number) 浼犲洖灝忎簬鎴栫瓑浜庢帴鏀跺弬鏁扮殑鏈澶ф暣鏁板箋?
IsArray(varname) 鍒ゆ柇涓涓彉閲忔槸鍚︿負鏁扮粍鍨嬫侊紝鑻ヤ負鏁扮粍鍒欎紶鍥濼rue錛屽弽涔嬪垯涓篎alse銆?
Day(datetime) 渚濇帴鏀剁殑鏃ユ湡鍙傛暟浼犲洖鏃ャ?
Eof(filenumber) 褰撴姷杈句竴涓寮鍚殑妗f緇撳熬鏃朵細浼犲洖True銆?
Exp(number) 渚濇帴鏀剁殑鍙傛暟浼犲洖e 鐨勬鏂瑰箋?
FileDateTime(pathname) 浼犲洖妗f寤虹珛鏃剁殑鏃ユ湡銆佹椂闂淬?
FileLen(pathname) 浼犲洖妗f鐨勯暱搴︼紝鍗曚綅鏄疊yte銆?
Filter(sourcearray, match[, include[, compare]]) 鎼滃瀛楃涓叉暟緇勪腑鐨勬寚瀹氬瓧絎︿覆錛屽嚒鏄暟緇勫厓绱犱腑鍚湁鎸囧畾瀛楃涓詫紝浼氬皢瀹冧滑緇撳悎鎴愭柊鐨勫瓧絎︿覆鏁扮粍騫朵紶鍥炪傝嫢鏄浼犲洖涓嶅惈鎸囧畾瀛楃涓茬殑鏁扮粍鍏冪礌錛屽垯include 鍙傛暟璁句負False銆?compare 鍙傛暟鍒欐槸璁懼畾鎼滃鏃舵槸鍚﹀尯鍒嗗ぇ灝忓啓錛屾鏃跺彧瑕佺粰TextCompare 甯告暟鎴? 鍗沖彲銆?
Fix(number) 鍘繪帀鍙傛暟鐨勫皬鏁伴儴鍒嗗茍浼犲洖銆?
Format(expression[, style[, firstdayofweek[, firstweekofyear]]]) 灝嗘棩鏈熴佹椂闂村拰鏁板艱祫鏂欒漿涓烘瘡涓浗瀹墮兘鍙互鎺ュ彈鐨勬牸寮忋?
FormatCurrency(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 灝嗘暟鍊艱緭鍑轟負閲戦鍨嬫併?
numdigitsafterdecimal 鍙傛暟涓哄皬鏁板瓧鏁幫紝includeleadingdigit 鍙傛暟涓哄綋鏁存暟涓? 鏃舵槸鍚﹁ˉ鑷蟲暣鏁板瓧鏁般?
CObj(expression) 杞崲琛ㄨ揪寮忎負Object 鍨嬫併?
CShort(expression) 杞崲琛ㄨ揪寮忎負Short 鍨嬫併?
CSng(expression) 杞崲琛ㄨ揪寮忎負Single 鍨嬫併?
CStr(expression) 杞崲琛ㄨ揪寮忎負String 鍨嬫併?
Choose (index, choice-1[, choice-2, ... [, choice-n]]) 浠ョ儲寮曞兼潵閫夋嫨騫朵紶鍥炴墍璁懼畾鐨勫弬鏁般?
Chr(charcode) 浠SCII 鐮佹潵鍙栧緱瀛楃鍐呭銆?
Close(filenumberlist) 緇撴潫浣跨敤Open 寮鍚殑妗f銆?
Cos(number) 鍙栧緱涓涓搴︾殑浣欏雞鍊箋?
Ctype(expression, typename) 杞崲琛ㄨ揪寮忕殑鍨嬫併?
DateAdd(dateinterval, number, datetime) 瀵規棩鏈熸垨鏃墮棿浣滃姞鍑忋?
DateDiff(dateinterval, date1, date2) 璁$畻涓や釜鏃ユ湡鎴栨椂闂撮棿鐨勫樊鍊箋?
DatePart (dateinterval, date) 渚濇帴鏀剁殑鏃ユ湡鎴栨椂闂村弬鏁頒紶鍥炲勾銆佹湀銆佹棩鎴栨椂闂淬?
DateSerial(year, month, day) 灝嗘帴鏀剁殑鍙傛暟鍚堝茍涓轟竴涓彧鏈夋棩鏈熺殑Date 鍨嬫佺殑鏁版嵁銆?
Datevalue(datetime) 鍙栧緱絎﹀悎鍥藉埆璁懼畾鏍峰紡鐨勬棩鏈熷鹼紝騫跺寘鍚椂闂淬?
Abs(number) 鍙栧緱鏁板肩殑緇濆鍊箋?
Asc(String) 鍙栧緱瀛楃涓茶〃杈懼紡鐨勭涓涓瓧絎SCII 鐮併?
Atn(number) 鍙栧緱涓涓搴︾殑鍙嶆鍒囧箋?
CallByName (object, procname, usecalltype,[args()]) 鎵ц涓涓璞$殑鏂規硶銆佽瀹氭垨浼犲洖瀵硅薄鐨勫睘鎬с?
CBool(expression) 杞崲琛ㄨ揪寮忎負Boolean 鍨嬫併?
CByte(expression) 杞崲琛ㄨ揪寮忎負Byte 鍨嬫併?
CChar(expression) 杞崲琛ㄨ揪寮忎負瀛楃鍨嬫併?
CDate(expression) 杞崲琛ㄨ揪寮忎負Date 鍨嬫併?
CDbl(expression) 杞崲琛ㄨ揪寮忎負Double 鍨嬫併?
CDec(expression) 杞崲琛ㄨ揪寮忎負Decimal 鍨嬫併?
CInt(expression) 杞崲琛ㄨ揪寮忎負Integer 鍨嬫併?
CLng(expression) 杞崲琛ㄨ揪寮忎負Long 鍨嬫?

]]>
鑷繁鍦ㄤ竴涓」鐩嬌鐢ㄥ埌鐨凞BUntil綾?/title><link>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51663.html</link><dc:creator>鐤祦鎴愭?/dc:creator><author>鐤祦鎴愭?/author><pubDate>Fri, 09 Jun 2006 04:24:00 GMT</pubDate><guid>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51663.html</guid><wfw:comment>http://www.tkk7.com/yuanhuaming/comments/51663.html</wfw:comment><comments>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51663.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/yuanhuaming/comments/commentRss/51663.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/yuanhuaming/services/trackbacks/51663.html</trackback:ping><description><![CDATA[ <p> <br />鍏堢湅涓?a target="_blank" ?=""><font color="#003399">INETA</font></a>鐗涗漢Stephen Walther鐨勬瘮杈冩祴璇曠粨璁?甯屾湜瀵瑰ぇ瀹舵湁鐢?/p> <ul> <li>DataReadear姣擠ataSet蹇?5% </li> <li>SqlDataReader姣擮leDbDataReader蹇?0% </li> <li>鐢―ataReader鐨凙SP椋庢牸鐨勮〃鏍兼樉紺烘瘮DataGrid緇戝畾DataReader蹇?0% </li> <li>鐢∣rdinal鐨凞ataReader璁塊棶瀛楁姣旂敤鍚嶅瓧璁塊棶蹇?5% </li> <li>DataGrid涓敤AutoGenerateColumns=true姣旂敤鏄懼紡緇戝畾蹇?4% </li> <li>灝介噺鐢ㄧ紦瀛?/li> </ul> <p>嫻嬭瘯鐢變簬姣旇緝灞闄愶紝鎵浠ヤ笉涓瀹氬緢鍑嗙‘錛屼絾鍙互鍋氫釜鍙傝冦?br /></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"> <span style="COLOR: #0000ff">Imports</span> <span style="COLOR: #000000">聽System.Data.OleDb<br /><br /><br /></span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Class</span> <span style="COLOR: #000000">聽ComDataBase<br /><br />聽聽聽聽</span> <span style="COLOR: #0000ff">Private</span> <span style="COLOR: #000000">聽LsConn聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Private</span> <span style="COLOR: #000000">聽LoleConn聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbConnection聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Private</span> <span style="COLOR: #000000">聽LoleTrans聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbTransaction聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">()<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽bOracle聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Boolean</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">False</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oIni聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽ComIniFile(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">..\INI\CCCC001.ini</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)<br /><br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(oIni.GetValue(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DB</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DBTYPE</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ORACLE</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽bOracle聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">True</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br /> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽sServer聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽oIni.GetValue(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DB</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">SERVERNAME</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽<br /><br /></span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽sDBName聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽oIni.GetValue(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DB</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DBNAME</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽sUser聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽oIni.GetValue(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DB</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">USER</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽sPsw聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽oIni.GetValue(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">DB</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">PASSWORD</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)聽聽聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(bOracle)聽</span> <span style="COLOR: #0000ff">Then<br /></span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽LsConn聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Provider=OraOLEDB.Oracle;Data聽Source=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sDBName聽_<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;User聽Id=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sUser聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;Password=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sPsw聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;OLEDB.NET=true</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Else</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">LsConn聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Provider=sqloledb;Data聽Source=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sServer聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;Initial聽Catalog=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽_<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sDBName聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;User聽Id=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sUser聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;Password=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽sPsw聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br /> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000">'db open<br /></span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽Open()<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(</span> <span style="COLOR: #0000ff">Not</span> <span style="COLOR: #000000">聽(LoleConn聽</span> <span style="COLOR: #0000ff">Is</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Nothing</span> <span style="COLOR: #000000">))聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽</span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(LoleConn.State聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽ConnectionState.Open)聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'鎺ョ稓鏂囧瓧鍒椼伅瀹氱京銇椼仾銇勬枃瀛楀垪</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(LoleConn.ConnectionString聽</span> <span style="COLOR: #000000"><></span> <span style="COLOR: #000000">聽LsConn)聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Close()<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.ConnectionString聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LsConn<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Open()<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Else</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'鎺ョ稓鏂囧瓧鍒椼伅瀹氱京銇椼仾銇勬枃瀛楀垪</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(LoleConn.ConnectionString聽</span> <span style="COLOR: #000000"><></span> <span style="COLOR: #000000">聽LsConn)聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.ConnectionString聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LsConn<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Open()<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Else</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbConnection(LsConn)<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Open()<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Catch</span> <span style="COLOR: #000000">聽ex聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽Exception<br />聽聽聽聽聽聽聽聽聽聽聽聽ComLog.SetErrLog(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ComDataBase</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Open</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">銉囥兗銈褲儥銉箋偣銇帴綞氥伀澶辨晽銇椼伨銇椼仧銆?/span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽ex.Message)<br />聽聽聽聽聽聽聽聽聽聽聽聽ComMsgBox.ErrMsg(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">E-0002</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽Close()<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'銉囥兗銈柯犮偨銉箋偣銇搞伄鎺ョ稓銈掗枆銇樸仚銈?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(</span> <span style="COLOR: #0000ff">Not</span> <span style="COLOR: #000000">聽(LoleConn聽</span> <span style="COLOR: #0000ff">Is</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Nothing</span> <span style="COLOR: #000000">))聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Close()<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Catch</span> <span style="COLOR: #000000">聽ex聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽Exception<br />聽聽聽聽聽聽聽聽聽聽聽聽ComLog.SetErrLog(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ComDataBase</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Close</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,聽ex.Message)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'瀵捐薄銈掕В鏀俱仚銈?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000">聽(</span> <span style="COLOR: #0000ff">Not</span> <span style="COLOR: #000000">聽(LoleConn聽</span> <span style="COLOR: #0000ff">Is</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Nothing</span> <span style="COLOR: #000000">))聽</span> <span style="COLOR: #0000ff">Then</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn.Dispose()<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LoleConn聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Nothing</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">If</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽BeginTrans()<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'銉堛儵銉熾偠銈偡銉с兂銈掗枊濮嬨仚銈?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽LoleTrans聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleConn.BeginTransaction()<br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽Commit()<br />聽聽聽聽聽聽聽聽Execute(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Delete聽銈楓偣銉嗐儬綆$悊聽where聽1=2</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'銉堛儵銉熾偠銈偡銉с兂銇祩鐐廣倰銉炪兗銈仚銈?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽LoleTrans.Commit()<br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Sub</span> <span style="COLOR: #000000">聽RollBack()<br />聽聽聽聽聽聽聽聽Execute(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Delete聽銈楓偣銉嗐儬綆$悊聽where聽1=2</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'銉囥兗銈垮鏇淬倰娑堝幓銇欍倠</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽LoleTrans.Rollback()<br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Sub</span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Function</span> <span style="COLOR: #000000">聽GetDataSet(</span> <span style="COLOR: #0000ff">ByVal</span> <span style="COLOR: #000000">聽sSQL聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽DataSet<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleAdapter聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbDataAdapter<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oDataSet聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽DataSet聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽DataSet<br /><br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleCommand聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbCommand(sSQL,聽LoleConn)<br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Transaction聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleTrans<br />聽聽聽聽聽聽聽聽聽聽聽聽oleAdapter聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbDataAdapter(oleCommand)<br />聽聽聽聽聽聽聽聽聽聽聽聽oleAdapter.Fill(oDataSet)聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'SQL鏂囥倰妞滅儲銇欍倠</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleAdapter.Dispose()聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'瀵捐薄銈掕В鏀?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Return</span> <span style="COLOR: #000000">聽oDataSet<br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Function</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Function</span> <span style="COLOR: #000000">聽Query(</span> <span style="COLOR: #0000ff">ByVal</span> <span style="COLOR: #000000">聽sSQL聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbDataReader<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleCommand聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbCommand(sSQL,聽LoleConn)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Transaction聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleTrans<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Return</span> <span style="COLOR: #000000">聽oleCommand.ExecuteReader()聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'SQL鏂囥倰妞滅儲銇欍倠</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Dispose()聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'瀵捐薄銈掕В鏀?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Function</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Function</span> <span style="COLOR: #000000">聽Query(</span> <span style="COLOR: #0000ff">ByVal</span> <span style="COLOR: #000000">聽sSQL聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #0000ff">ByRef</span> <span style="COLOR: #000000">聽aryOleDbParameter聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽ArrayList)聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbDataReader<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleCommand聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbCommand(sSQL,聽LoleConn)<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleParam聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbParameter<br /><br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Transaction聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleTrans<br /><br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">For</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Each</span> <span style="COLOR: #000000">聽oleParam聽</span> <span style="COLOR: #0000ff">In</span> <span style="COLOR: #000000">聽aryOleDbParameter<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Parameters.Add(oleParam)<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Next</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Return</span> <span style="COLOR: #000000">聽oleCommand.ExecuteReader()聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'SQL鏂囥倰妞滅儲銇欍倠</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Dispose()聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'瀵捐薄銈掕В鏀?/span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Function</span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Function</span> <span style="COLOR: #000000">聽Execute(</span> <span style="COLOR: #0000ff">ByVal</span> <span style="COLOR: #000000">聽sSQL聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Integer</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleCommand聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbCommand(sSQL,聽LoleConn)聽聽聽</span> <span style="COLOR: #008000">'</span> <span style="COLOR: #008000">'OleDbCommand銇柊銈ゃ兂銈廣偪銉熾偣</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Transaction聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleTrans<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Return</span> <span style="COLOR: #000000">聽oleCommand.ExecuteNonQuery()聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Dispose()聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br />聽聽聽聽聽聽 聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Function</span> <span style="COLOR: #000000"> <br /> <br />聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">Public</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Function</span> <span style="COLOR: #000000">聽Execute(</span> <span style="COLOR: #0000ff">ByVal</span> <span style="COLOR: #000000">聽sSQL聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">String</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #0000ff">ByRef</span> <span style="COLOR: #000000">聽aryOleDbParameter聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽ArrayList)聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Integer</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleCommand聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">New</span> <span style="COLOR: #000000">聽OleDbCommand(sSQL,聽LoleConn)聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Dim</span> <span style="COLOR: #000000">聽oleParam聽</span> <span style="COLOR: #0000ff">As</span> <span style="COLOR: #000000">聽OleDbParameter<br />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Transaction聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽LoleTrans<br /><br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">For</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Each</span> <span style="COLOR: #000000">聽oleParam聽</span> <span style="COLOR: #0000ff">In</span> <span style="COLOR: #000000">聽aryOleDbParameter<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Parameters.Add(oleParam)<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Next</span> <span style="COLOR: #000000"> <br /> <br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Return</span> <span style="COLOR: #000000">聽oleCommand.ExecuteNonQuery()聽聽聽聽聽</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">Finally</span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽聽聽聽聽聽聽oleCommand.Dispose()聽聽<br /></span> <span style="COLOR: #000000"> <br />聽聽聽聽聽聽 聽</span> <span style="COLOR: #0000ff">End</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">Try</span> <span style="COLOR: #000000"> <br />聽聽聽聽</span> <span style="COLOR: #0000ff">End聽Function</span> <span style="COLOR: #000000"> <br /> </span> </div> <p>鍩烘湰鍔熻兘閮芥湁浜嗭紝瀵逛簬灝忛」鐩岃█錛岃繖涓被澶熺敤浜嗐?br />聽</p> <img src ="http://www.tkk7.com/yuanhuaming/aggbug/51663.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/yuanhuaming/" target="_blank">鐤祦鎴愭?/a> 2006-06-09 12:24 <a href="http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51663.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞竴綃囧皝瑁匒DO鐨勪唬鐮?/title><link>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51639.html</link><dc:creator>鐤祦鎴愭?/dc:creator><author>鐤祦鎴愭?/author><pubDate>Fri, 09 Jun 2006 03:11:00 GMT</pubDate><guid>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51639.html</guid><wfw:comment>http://www.tkk7.com/yuanhuaming/comments/51639.html</wfw:comment><comments>http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51639.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/yuanhuaming/comments/commentRss/51639.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/yuanhuaming/services/trackbacks/51639.html</trackback:ping><description><![CDATA[     鎽樿: using 聽System; using 聽System.Collections; using 聽System.Collections.Specialized; using 聽System.Runtime.Remoting.Messaging; using 聽System.Data; using ...  <a href='http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51639.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/yuanhuaming/aggbug/51639.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/yuanhuaming/" target="_blank">鐤祦鎴愭?/a> 2006-06-09 11:11 <a href="http://www.tkk7.com/yuanhuaming/archive/2006/06/09/51639.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬DataGrid鍒嗛〉闂 http://www.tkk7.com/yuanhuaming/archive/2005/08/16/10278.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Tue, 16 Aug 2005 10:21:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10278.htmlhttp://www.tkk7.com/yuanhuaming/comments/10278.htmlhttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10278.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/10278.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/10278.html       涓浼氬効錛屾垜灝辨壘鍒扮瓟妗堜簡錛岄敊灝遍敊鍦ㄦ垜澶浉淇S.NET鐨勬櫤鑳戒簡銆俤ataGrid铏界劧鎻愪緵浜嗙炕欏電殑鍔熻兘錛屼絾鏄笉澶櫤鑳斤紝闇瑕佷綘閫氳繃涓涓簨浠舵妸鏂伴〉璁劇疆鎴愬綋騫撮〉銆?BR>
榪欐槸datashow鏄劇ず閮ㄥ垎錛屾敞鎰忎竴瀹氳鍐?lt;form>鍐?BR><asp:datagrid id="dataShow" Runat="server" OnPageIndexChanged="dataShow_Changed" AllowPaging=True PageSize=2 PagerStyle-HorizontalAlign=Right Width=100%></asp:datagrid>

浠g爜濡備笅錛?BR>
    OleDbConnection conn;
        
string strcon;
        
string strcmd;
        
protected System.Web.UI.WebControls.Label label1;
        OleDbDataAdapter cmd;
        DataSet ds;
        
private void Page_Load(object sender, System.EventArgs e)
        
{
                strcon
="Provider=microsoft.jet.oledb.4.0;data source=c:\\inetpub\\wwwroot\\Flowers\\FlowerDB.mdb";
                conn
=new OleDbConnection(strcon);
                strcmd
="select FlowerName,FlowerPrice from Flowers where FlowerTypeID=(select FlowerTypeID from FlowerType where FlowerTypeName=@name)";
                cmd
=new OleDbDataAdapter(strcmd,conn);
                cmd.SelectCommand.Parameters.Add(
new OleDbParameter("@name", OleDbType.Char,80));
                cmd.SelectCommand.Parameters[
"@name"].Value=Session["name"];
                ds
=new DataSet();
                cmd.Fill(ds,
"Flowers");    
                dataShow.DataSource
=ds.Tables["Flowers"].DefaultView;    
                dataShow.DataBind();
                label1.Text
="涓鍏辨湁" +ds.Tables["Flowers"].Rows.Count.ToString()+"鏉¤褰曘?/SPAN>";

        }

//榪欎釜浜嬩歡灝辨槸褰撶敤鎴烽夋嫨鏀瑰彉褰撳墠欏電殑绱㈠紩鏃訛紝灝辨妸鏂伴〉鐨勭儲寮曚綔涓哄綋鍓嶉〉鐨勭儲寮曪紝鍚屾椂闇瑕佸啀嬈$粦瀹?/SPAN>
        public void dataShow_Changed(Object sender, DataGridPageChangedEventArgs e)
        
{
            dataShow.CurrentPageIndex 
= e.NewPageIndex;
            dataShow.DataBind();
            
        }





]]>
ADO.NET瀛︿範絎旇2http://www.tkk7.com/yuanhuaming/archive/2005/08/16/10242.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Tue, 16 Aug 2005 08:36:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10242.htmlhttp://www.tkk7.com/yuanhuaming/comments/10242.htmlhttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10242.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/10242.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/10242.html    瑕佸疄鐜伴氳繃鎺т歡鏉ヨ闂暟鎹簱鏁版嵁錛屽繀欏諱粠鏁版嵁搴撴绱㈡暟鎹傛暟鎹粦瀹氭槸灝嗘绱㈠埌鐨勬暟鎹笌鏄劇ず璇ユ暟鎹殑鎺т歡榪涜閾炬帴鐨勮繃紼嬨備嬌鐢ㄦ暟鎹粦瀹氳〃杈懼紡鍙皢鏁版嵁緇戝畾鍒版墍鏈夌被鍨嬬殑鎺т歡涓備嬌鐢―ataSource灞炴у彲浠ュ皢鏁版嵁緇戝畾鍒板鏉傛帶浠朵腑錛屽DataList,DataGrid.....錛堜笉榪囦粖澶╀富瑕佽濡備綍浣跨敤緇戝畾寮忥級
    鍙互浠庡悇綾誨瀷鐨勬暟鎹墽琛屾暟鎹粦瀹氭搷浣滐紝濡傦細

1.綆鍗曞睘鎬?BR>

<%@Import Namespace=System.Web.UI.WebControls %>
<%@Import Namespace=System %>
<HTML>
 
<HEAD>
  
<title>test</title>
  
<script language="C#" runat="server">
  
void Txt_Changed(Object sender,EventArgs e)
  
{
   Page.DataBind();
  }

  
</script>
 
</HEAD>
 
<body>
 
<form id=form1 runat=server>
  
<asp:TextBox ID="txtBox" OnTextChanged="Txt_Changed" Runat="server"/>
  
<br>
  
<asp:Label ID=lblShow  Runat=server><%# txtBox.Text %></asp:Label>
 
</form>
 
</body>
</HTML>

2.闆嗗悎        //宸茬粡鍦ㄤ笂嬈¤榪囦簡錛屽氨鏄皢鏁版嵁緇戝畾鍒癆rrayList涓殑渚嬪瓙
3.琛ㄨ揪寮?BR>4.鏂規硶璋冪敤鐨勭粨鏋?BR>
<%@Import Namespace=System %>
<%@Import Namespace=System.Web.UI.WebControls %>
<%@Import Namespace=System.Data %>
<HTML>
 
<HEAD>
  
<title>test</title>
  
<script language="C#" runat="server">
  
void Page_Load(Object sender,EventArgs e)
  
{
   
if(!IsPostBack)
   
{
    DataTable dt
=new DataTable("num");
    dt.Columns.Add(
new DataColumn("鏁板瓧",typeof(Int32)));
    DataRow dr;
    
for(int i=0;i<10;i++)
    
{
     dr
=dt.NewRow();
     dr[
0]=i;     
     dt.Rows.Add(dr);
    }
   
    DataView.DataSource
=dt;
    DataView.DataBind();
   }

  }

  String square(
int a)
  
{
   
int num=a*a;
   
return num.ToString();//榪斿洖綾誨瀷鏄痵tring錛屾墍浠ヨ杞被鍨?/SPAN>
  }

  
</script>
 
</HEAD>
 
<body>
  
<form id="form1" runat="server">
  
<asp:DataList ID=DataView Runat=server>
  
<!--  ItemTemplate鍏跺疄鏄疍ataList涓殑妯℃澘錛屽姛鑳芥槸涓烘暟鎹泦鍚堜腑鐨勬瘡涓琛屽憟鐜頒竴嬈°傝繕鏈夊叾瀹冩ā鏉胯鐪婱SDN-->
   
<ItemTemplate>
   
<!-- 
   涓嬮潰鏃㈤噰鐢ㄤ簡琛ㄨ揪寮忥紝鏈夌敤浜嗘柟娉曡皟鐢ㄣ傝繕浠嬬粛浜咲ataBinder.Eval()鏂規硶錛屾湁3涓弬鏁幫細
   1銆傛暟鎹」鐨勫懡鍚嶅鍣細Container.DataItem
   2銆傛暟鎹瓧孌靛悕(鍒楀悕)
   3銆傛牸寮忓瓧絎︿覆錛屽彲閫?nbsp;  
-->
    鏁板瓧錛?/SPAN><%# DataBinder.Eval(Container.DataItem,"鏁板瓧"%>
    騫蟲柟錛?/SPAN><%# square((int)DataBinder.Eval(Container.DataItem,"鏁板瓧")) %>
   
</ItemTemplate>
  
</asp:DataList>
  
</form>
 
</body>
</HTML>




]]>
ADO.NET瀛︿範絎旇1http://www.tkk7.com/yuanhuaming/archive/2005/08/16/10239.html鐤祦鎴愭?/dc:creator>鐤祦鎴愭?/author>Tue, 16 Aug 2005 08:31:00 GMThttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10239.htmlhttp://www.tkk7.com/yuanhuaming/comments/10239.htmlhttp://www.tkk7.com/yuanhuaming/archive/2005/08/16/10239.html#Feedback0http://www.tkk7.com/yuanhuaming/comments/commentRss/10239.htmlhttp://www.tkk7.com/yuanhuaming/services/trackbacks/10239.htmlADO.NET鎷ユ湁2澶ф牳蹇冪粍浠訛細
a.DataSet
b..net鏁版嵁鎻愪緵紼嬪簭

鍏朵腑DataSet涓嶄笌鏁版嵁搴撲氦浜掞紝瀹冨彧鏄竴涓暟鎹鍣ㄣ備笌鏁版嵁搴撴墦浜ら亾鐨勫紡.net鏁版嵁鎻愪緵紼嬪簭銆?/P>

涓嬮潰鎴戦棬鏉ョ湅3孌典唬鐮侊細

1.濡備綍鎶婅〃娣誨姞鍒癉ataSet涓?BR>

 DataSet ds=new DataSet();
 DataTable dt
=new DataTable("num");
 dt.Columns.Add(
new DataColumn("鏁板瓧",typeof(Int32)));
 dt.Columns.Add(
new DataColumn("騫蟲柟",typeof(Int32)));
 DataRow dr;
 
for(int i=0;i<10;i++)
 
{
  dr
=dt.NewRow();
  dr[
0]=i;
  dr[
1]=i*i;
  dt.Rows.Add(dr);
 }

 ds.Tables.Add(dt);
 show.DataSource
=ds.Tables["num"].DefaultView;//show鏄疍ataGrid瀵硅薄
 show.DataBind();



2.DataAdapter瀵硅薄鐨勪嬌鐢?BR>

 string strCon="Data Source=.;uid=sa;pwd=hotman;Initial Catalog=pubs";
 SqlConnection conn
=new SqlConnection(strCon);
 
string strcmd="select *from titles";
// 2縐嶆柟娉曟绱㈡暟鎹?BR>// SqlCommand comm=new SqlCommand(strcmd,conn);
// SqlDataAdapter cmd=new SqlDataAdapter();
// cmd.SelectCommand=comm;

 SqlDataAdapter cmd
=new SqlDataAdapter(strcmd,conn);
 
//鍦ㄥ垱寤鴻繛鎺ヤ箣鍚庯紝蹇呴』媯绱㈡暟鎹茍鐢ㄦ墍媯绱㈢殑鏁版嵁濉厖dataset
 conn.Open();//铏界劧.NET鎻愪緵浜嗘柇寮寮忚繛鎺ワ紝浣嗘槸涓轟簡鎻愰珮鎬ц兘錛屾渶濂芥樉寮忕殑鎵撳紑鍏抽棴
 DataSet ds=new DataSet();//鍒涘緩dataset瀵硅薄
 cmd.Fill(ds,"titles");
 show.DataSource
=ds.Tables["titles"].DefaultView;
 show.DataBind();
 conn.Close();




 3.SqlDataReader瀵硅薄鐨勪嬌鐢?/P>

 // DataReader鏄煡璇㈢粨鏋滅殑涓縐嶅彧璇昏闂?BR> //浼樼偣鏄ぇ澶у姞蹇簡璁塊棶鏁版嵁鐨勯熷害
 
//涓嶆彁渚涙柇寮寮忚闂?/SPAN>
 string strCon="Data Source=.;uid=sa;pwd=hotman;Initial Catalog=pubs";
 
string strcmd="select *from titles";
 SqlConnection conn
=new SqlConnection(strCon);
 SqlCommand cmd
=new SqlCommand(strcmd,conn);
 conn.Open();   
 SqlDataReader reader
=cmd.ExecuteReader();
 show.DataSource
=reader;
 show.DataBind();
 conn.Close();


 

 



]]>
主站蜘蛛池模板: 99热这里有免费国产精品| 在线人成精品免费视频| 久久九九亚洲精品| 亚洲乱码国产乱码精华| 亚洲免费无码在线| 边摸边吃奶边做爽免费视频99| 亚洲色欲久久久久综合网| 午夜亚洲WWW湿好爽| 亚洲人成人77777网站| 国产精品免费久久久久电影网| 亚洲成a人片在线观看中文动漫| 国产做国产爱免费视频| 亚洲精品麻豆av| 最新黄色免费网站| 亚洲成a人片77777群色| 国产大片免费网站不卡美女| 阿v视频免费在线观看| 免费大黄网站在线观| 日韩电影免费在线观看网址| 亚洲成?v人片天堂网无码| 曰批全过程免费视频免费看| 亚洲一区二区三区四区在线观看 | 久久久久久影院久久久久免费精品国产小说| 国产成人免费a在线视频色戒| 性xxxx黑人与亚洲| 亚洲精品国产精品乱码在线观看| 日韩成人免费在线| 91禁漫免费进入| 亚洲AV日韩综合一区尤物| 欧洲亚洲国产清在高| 国产一区二区三区免费在线观看| 亚洲一级毛片免费看| 99久久婷婷免费国产综合精品| 亚洲精品无码久久久久YW| 亚洲JIZZJIZZ中国少妇中文| 中文字幕无码成人免费视频| 亚洲av无码专区在线电影天堂 | 亚洲国产日韩a在线播放| 亚洲国产国产综合一区首页| 在线观看亚洲av每日更新| 99精品一区二区免费视频|