




版權(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)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 江蘇連云港2024~2025學(xué)年高一下冊6月期末考試數(shù)學(xué)試題學(xué)生卷
- 鐵礦石選礦反浮選劑的吸附機理研究考核試卷
- 體育設(shè)施信托投資與地方經(jīng)濟發(fā)展關(guān)系分析考核試卷
- 智能化通風(fēng)設(shè)備智能語音交互功能設(shè)計考核試卷
- 醫(yī)療設(shè)備智能化設(shè)備遠程控制與操作培訓(xùn)系統(tǒng)考核試卷
- 養(yǎng)鴨業(yè)節(jié)能減排技術(shù)考核試卷
- 乳品產(chǎn)業(yè)政策與乳品行業(yè)標準化戰(zhàn)略研究考核試卷
- 2025年中國PET抗靜電托盤數(shù)據(jù)監(jiān)測報告
- 2025年中國IC卡鎖數(shù)據(jù)監(jiān)測報告
- 2025年中國DJ專用麥克風(fēng)數(shù)據(jù)監(jiān)測研究報告
- 化妝品生產(chǎn)工藝驗證報告范文模板-新規(guī)要求工藝參數(shù)及關(guān)鍵控制點驗證
- 二年級勞動教育全冊教案
- 自動扶梯采購?fù)稑朔桨福夹g(shù)方案)
- 醫(yī)學(xué)院《病歷書寫》評分表
- 駐足思考瞬間整理思路并有力表達完整版
- 河南省南陽市2022-2023學(xué)年高一下學(xué)期7月期末考試物理試題(PDF版含答案)
- 大學(xué)生創(chuàng)新創(chuàng)業(yè)教程完整全套課件
- Module 6 Unit1 Ill draw the pictures(教學(xué)設(shè)計)-2022-2023學(xué)年英語四年級下冊 -外研版(一起)
- 2023年新改版蘇教版五年級下冊科學(xué)全冊精編知識點(附問答題總結(jié))
- control4-編程說明講解
- 2023年初高中數(shù)學(xué)銜接知識點及習(xí)題
評論
0/150
提交評論