DAORDOADO

来源:互联网 发布:linux改文件名命令 编辑:程序博客网 时间:2024/06/02 03:20
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

ADOisn'tautomaticallycode-compatiblewithyourexistingdataaccessapplications.WhileADOencapsulatesthefunctionalityofDAOandRDO,youmustconvertmanyofthelanguageelementsovertoADOsyntax.Insomecases,thiswillmeanonlyasimpleconversionofsomefunctionsofyourexistingcode.Inothercases,itmightbebesttorewritetheapplicationusingADO'snewfeatures.

DAO(DataObjects)wasthefirstobject-orientedinterfacethatexposedtheMicrosoftJetdatabaseengine(usedbyMicrosoftAccess)andalloweddeveloperstodirectlyconnecttoAccesstables-aswellasotherdatabases-throughODBC.DAOissuitedbestforeithersingle-systemapplicationsorforsmall,localdeployments.

RDO(RemoteDataObjects)isanobject-orienteddataaccessinterfacetoODBCcombinedwiththeeasy-to-usestyleofDAO,providinganinterfacethatexposesvirtuallyallofODBCslow-levelpowerandflexibility.RDOislimited,though,inthatitdoesn'taccessJetorISAMdatabasesverywell,andthatitcanaccessrelationaldatabasesonlythroughexistingODBCdrivers.However,RDOhasproventobetheinterfaceofchoiceforalargenumberof,,andotherlargerelationaldatabasedevelopers.RDOprovidestheobjects,properties,andmethodsneededtoaccessthemorecomplexaspectsofstoredproceduresandcomplexresultsets.

ADOisthesuccessortoDAO/RDO.FunctionallyADO2.0ismostsimilartoRDO,andthere'sgenerallyasimilarmappingbetweenthetwomodels.ADO"flattens"theobjectmodelusedbyDAOandRDO,meaningthatitcontainsfewerobjectsandmoreproperties,methods(andarguments),andevents.Forexample,ADOhasnoequivalentstotherdoEngineandrdoEnvironmentobjects,whichexposedtheODBCdrivermanagerandhEnvinterfaces.NorcanyoucurrentlycreateODBCdatasourcesfromADO,despitethefactthatyourinterfacemightbethroughtheODBCOLEDBserviceprovider.

MuchofthefunctionalitycontainedintheDAOandRDOmodelswasconsolidatedintosingleobjects,makingforamuchsimplerobjectmodel.Becauseofthis,however,youmightinitiallyfinditdifficulttofindtheappropriateADOobject,collection,property,method,orevent.UnlikeDAOandRDO,althoughADOobjectsarehierarchical,theyarealsocreatableoutsidethescopeofthehierarchy.

Itshouldbenoted,however,thatADOcurrentlydoesn'tsupportallofDAO'sfunctionality.ADOmostlyincludesRDO-stylefunctionalitytointeractwithOLEDBdatasources,plusremotingandDtechnology.

Ingeneral,it'sprobablytooearlyintheevolutionofADOtomigratemostDAOapplications(exceptpossiblyonesusingODBCDirect)toADOrightnow,sinceADOdoesn'tcurrentlysupportdatadefinition(DDL),users,groups,andsoforth.IfyouuseDAOonlyforclient-serverapplicationsanddon'trelyontheJetdatabaseengineoruseDDL,however,thenyoucanprobablymigratetoADOnow.Eventually,MicrosoftwillprovideanADODDLcomponenttoaidinDAO-to-ADOmigrationandprovidegenericDDLsupportforOLEDBproviders.1<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击