精華區beta Programming 關於我們 聯絡資訊
※ 引述《lobnqii@kkcity.com.tw (lobnqii)》之銘言: : 程式這樣寫有點奇怪! : 1. connection 打開之後 : 2. 給一個SQL字串,例:sSQL=" select * from employee" : 3. 設定查詢給果給recordset 即可。 ==> set rsTemp=adoCnn.Execute(sSQL) : 4. 要結束connection 給它 nothing => set adoCnn=nothing : 5. 一起給recordset nothing => set rsTemp=nothing : 以上是我用過最靈活的寫法。大部份的書都介紹 command做法,其實connection : 本身就已有存取的方式。(覺得用command方式有點杵) 當然怪! 你拿 ADO 來質疑 ADO.Net 的寫法, 一開始就錯了, 後面更是一路錯下去 就像拿 "明朝的劍斬清朝的官" 一樣 XD -- ※ Origin: 鳥窩 (BirdNest.twbbs.org) ◆ From: SunRise.GIGX.net