




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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長期提交轉換();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壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 安陽車管預約管理辦法
- 自動監(jiān)控資質管理辦法
- 種植設備設施管理辦法
- 福建游戲游藝管理辦法
- 育嬰護理知識培訓課件
- 肥厚型心肌病
- 股票技術課件
- 原材料管理培訓課件
- 肝癌中醫(yī)教學課件
- 廣東20年高考數(shù)學試卷
- 六堡茶知識課件
- 2025年上海高考英語復習必背考綱詞匯手冊默寫
- 2025安全生產法律法規(guī)專題知識培訓
- 2025年全民反詐知識競賽題庫及答案(共50題)
- 2025年江西省三支一扶考試真題
- 超市安全管理
- 2025年四川省安全員《A證》考試題庫
- 2024年山東省夏季普通高中學業(yè)水平合格考試歷史試卷
- 月子中心員工手冊管理制度
- 2025中考數(shù)學專項復習:最值問題之瓜豆原理模型(含答案)
- 醫(yī)藥制造與流通行業(yè)2024年信用回顧與2025年展望-新世紀評級
評論
0/150
提交評論