版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、a set of ado classes -版本2.10by卡洛斯antolliniOverviewThe CADODatabase ClassCADODatabaseOpenExecutegetrecordsaffedctedGetActiveConnectiongetc記錄計數(shù)begin傳遞提交事務(wù)處理. CommitTransaction滾動后退事務(wù)。iseopen克羅斯SetConnectionStringGetConnectionStringSetConnectionModeGetLastErrorGetLastErrorStringthe cadorecordset類CADORec
2、ordsetOpenExecuteGetQuerySetQuery記錄綁定(程序)getc記錄計數(shù)iseopen克羅斯GetFieldCountGetFieldValueIsFieldNullIsFieldEmptyPPS公司PK PKMoveabsolumesepageGetPageCountPageSizeAbsolutePositionGetFieldInfoGetChunkAppendChunkGetStringGetLastErrorGetLastErrorString添加新的。edit刪除更新。取消更新SetFieldValueFindFindFirstFindNextGetBoo
3、kmarkSetBookmarkSetFilterSetSortgetcrecordsetGetActiveConnection克隆人另存為XML開放XMLthe cadoparameter類CADOParameterprecision的設(shè)定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服務(wù)器; 目錄=sampledb ;添加B-設(shè)置連接(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服務(wù)器; 目錄=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事務(wù)在事務(wù)開始后更新。長begin transaction ();cadodatabase :3360提交事務(wù)callcomtinttractiontrafintocomtintatractionforexplamesag
11、rogupofeditsandupdate長期提交轉(zhuǎn)換();cadodatabase :30滾動后退事務(wù)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)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度風(fēng)力發(fā)電設(shè)備采購合同擔(dān)保服務(wù)3篇
- 2024版學(xué)校運動場施工合作合同版B版
- 2024年食材供應(yīng)鏈管理合同2篇
- 2024年版:建筑消防排煙系統(tǒng)施工合同
- 2024鐵路工程項目信息化建設(shè)合同樣本3篇
- 2024年足浴城加盟協(xié)議3篇
- 2025年度窗簾行業(yè)發(fā)展趨勢研究與預(yù)測合同3篇
- 工廠供配電技術(shù)
- 2024版建筑木工班組勞務(wù)合作協(xié)議
- 2025年度鍋爐設(shè)備節(jié)能評估與咨詢服務(wù)合同3篇
- DB12T 577-2015 地理標(biāo)志產(chǎn)品 紅花峪桑椹
- 2024年山西省晉中市公開招聘警務(wù)輔助人員(輔警)筆試專項訓(xùn)練題試卷(2)含答案
- 福建省廈門市2023-2024學(xué)年高二上學(xué)期1月期末質(zhì)量檢測數(shù)學(xué)試題(解析版)
- 2023九年級歷史上冊 第二單元 5《羅馬城邦和羅馬帝國》教學(xué)實錄 新人教版
- 學(xué)校2025元旦假期安全教育宣傳課件
- 功能科提高動態(tài)心電圖檢查人次PDCA
- 咨詢總監(jiān)述職報告
- 教育綜合體項目策劃書
- 項目經(jīng)理年度工作總結(jié)
- 2024版質(zhì)量管理培訓(xùn)
- 2024年廣東省公務(wù)員錄用考試《行測》真題及答案解析
評論
0/150
提交評論