![ADO2使用說明文檔_第1頁](http://file1.renrendoc.com/fileroot_temp2/2020-6/22/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb1.gif)
![ADO2使用說明文檔_第2頁](http://file1.renrendoc.com/fileroot_temp2/2020-6/22/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb2.gif)
![ADO2使用說明文檔_第3頁](http://file1.renrendoc.com/fileroot_temp2/2020-6/22/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb3.gif)
![ADO2使用說明文檔_第4頁](http://file1.renrendoc.com/fileroot_temp2/2020-6/22/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb4.gif)
![ADO2使用說明文檔_第5頁](http://file1.renrendoc.com/fileroot_temp2/2020-6/22/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb/ba6bfb77-94f2-4647-890c-3bfb4ea1d2bb5.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、a set of ado classes -版本2.10by卡洛斯antolliniOverviewThe CADODatabase ClassCADODatabaseOpenExecutegetrecordsaffedctedGetActiveConnectiongetc記錄計數(shù)begin傳遞提交事務處理. CommitTransaction滾動后退事務。iseopen克羅斯SetConnectionStringGetConnectionStringSetConnectionModeGetLastErrorGetLastErrorStringthe cadorecordset類CADORec
2、ordsetOpenExecuteGetQuerySetQuery記錄綁定(程序)getc記錄計數(shù)iseopen克羅斯GetFieldCountGetFieldValueIsFieldNullIsFieldEmptyPPS公司PK PKMoveabsolumesepageGetPageCountPageSizeAbsolutePositionGetFieldInfoGetChunkAppendChunkGetStringGetLastErrorGetLastErrorString添加新的。edit刪除更新。取消更新SetFieldValueFindFindFirstFindNextGetBoo
3、kmarkSetBookmarkSetFilterSetSortgetcrecordsetGetActiveConnection克隆人另存為XML開放XMLthe cadoparameter類CADOParameterprecision的設定SetScaleSetValueGetValueSetNameGetNameGetTypeGetParemeterThe CADOCommand ClassCADOCommandAddParameterSetTextGetTextSetTypeGetTypeGetCommandExecutegetrecordsaffedctedThe CJectEngin
4、e Classcompact數(shù)據(jù)庫公共questionsOverviewicreatesseclestomakeiteemeexemetoworkswithado.forthicreatethecadodatabs類和thecadorecordsetclassThe CADODatabase Classcadodatabaseclasshasasetoffunctionsthatcorrespondstothe _ connection ptrcadodatabase :30 cadodatabasecreates a cadodatabase對象。CADODatabase ();CADODa
5、tabase:Openopenfunctionopensaconnectiontoadatabase。bool open (lprctstrlpstrconnection=_ t ( );Parameterslpctstrlpstrconnectiontheconnectionstring。See samplenote : hiscalshasthefoncen/samplewithconnectionstringfor
6、sqlservercadodatabase * pdadodb=newccadodatabase ();CString strConnection=_T ( );strconnection=_ t (提供器=msdasql; PersistSecurityInfo=False; trusted _ connection=是; 是數(shù)據(jù)源=訪問SQL服務器; 目錄=sampledb ;添加B-設置連接(strconnection )if(pAdoDb-Open () )do什么();./samplewithconnectionstringforaccessdatabasecadodatabase
7、* pdadodb=newccadodatabase ();CString strConnection=_T ( );strconnection=_ t ( provider=Microsoft.jet.oledb.4.0; )數(shù)據(jù)源=c : VC項目ado test dbtest.MDB ;adod B- setconnectionstring (strconnection )if(pAdoDb-Open () )舉止do什么();.pAdoDb-Close ();以下刪除p adodb;CADODatabase:Executeexecutefunctionexecuteasasql語句位于
8、開放數(shù)據(jù)庫中布爾執(zhí)行(lpctstr lpstr exec )Parameterslpctstrlpstrexeca字符串pointercontingthesqlstatementtoexecute。cadodatabase * pdadodb=newccadodatabase ();CString strConnection=_T ( );strconnection=_ t ( provider=msdasql; ) PersistSecurityInfo=False; 是 trusted _ connection=是數(shù)據(jù)源=訪問SQL服務器; 目錄=sampledb ;if(pAdoDb-
9、Open(strConnection ) )adod B- execute ( deletefromtblclientswherecheker=3 );返回值。完全發(fā)揮了作用cadodatabase :6030 ggercordirecorrdsaffedctedtegrecordefacchdfectformentofrecordrecordecordectronforrdecordectrecordectint GetRecordsAffected ();cadodatabase :30 getactiveconnectiongetactiveconnectionreturnstheact
10、iveconnection_ connectionptrgetactiveconnection ();cadodatabase :30 get record count受到唱片的影響dwordgetrecordcount (_ recordset ptr _ PRS )Parameters_recorsetptrm_prs記錄集cadodatabase :3360 begin事務在事務開始后更新。長begin transaction ();cadodatabase :3360提交事務callcomtinttractiontrafintocomtintatractionforexplamesag
11、rogupofeditsandupdate長期提交轉(zhuǎn)換();cadodatabase :30滾動后退事務callballbackbretractintractionformentthecurrrentrationandrestofthecurrrenttr長滾動后退傳遞();cadodatabase:30isopen用數(shù)據(jù)庫連接BOOL IsOpen ();返回值。finconnectionreturnstrueiftheconnectiontosdatabaseiseopen。CADODatabase:Close連接到數(shù)據(jù)庫。void Close ();cadodatabase :3360
12、setconnectionstringwiththesetconnectionstringyoucaninserttheconnectionstring。voidsetconnectionstring (lpctstrlpstrconnection )Parameterslpctstrlpstrconnectionaconnectionstringusedforaopeninthedatabase。see CADODatabase:Open ()cadodatabase :3360 getconnection stringthegetconnectionstringformationstrin
13、gforadadatabase。CString GetConnectionString ();cadodatabase :3360 setconnectionmodethesectconnectionmodefunctionsetsthemodeofconnection。voidsetconnectionmode (cadoconnectmodelenumnmode )Parameterscoonconneconnemodenmodeavirialtheconnemodetobeused.itcanebeonofthefollowing :cadodatabase :3360 connectmodeunknowncadodatabase :3360 connectmodereadcadodatabase :3360 connectmodewritecadodatabase :30 connectmodereadwritecadodatabase :5360 connectmodesharedenyreadcadodat
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度網(wǎng)紅電商品牌購銷合同
- 2025年度礦山資源整合與投資合作協(xié)議
- 施工方案對土石方材料的要求與選擇
- 游泳教學與生命安全教育的融合
- 高校突發(fā)公共事件應急預案
- 數(shù)據(jù)中心安全管理措施與緊急情況應對實例分析
- 60條合同規(guī)定:如何實現(xiàn)一次性產(chǎn)品零使用
- 上市公司廣告策劃與執(zhí)行合同范本
- 二手房訂房合同條款解析
- 中歐技術合作合同
- 《中國心力衰竭診斷和治療指南(2024)》解讀完整版
- 《檔案管理課件》課件
- 2024年度中國共產(chǎn)主義共青團團課課件版
- 2025年中考物理終極押題猜想(新疆卷)(全解全析)
- 脛骨骨折的護理查房
- 抽水蓄能電站項目建設管理方案
- 電動工具培訓課件
- 《智能網(wǎng)聯(lián)汽車智能傳感器測試與裝調(diào)》電子教案
- 視頻會議室改造方案
- 【中考真題】廣東省2024年中考語文真題試卷
- GB/T 32399-2024信息技術云計算參考架構(gòu)
評論
0/150
提交評論