资源描述:
《宾馆客房管理系统外文毕业论文.doc》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、宾馆客房管理系统外文毕业论文ArchitecturalOverviewofADO.NETTheADO.NETobjectmodelconsistsoftwofundamentalcomponents:theDataSet,whichisdisconnectedfromthedatasourceanddoesn'tneedtoknowwherethedataith-oldscamefrom;andthe.NETdataprovider.The.NETdataprovidersallowustoconn-ecttothedatasource,andtoexecuteSQLcomman
2、dsagainstit..NETDataProvidersAtthetimeofwriting,therearethree.NETdataprovidersavailable:forSQLServer,forOLEDBdatasources,andforODBC-compliantdatasources.EachproviderexistsinanamespacewithintheSystem.Datanamespace,andconsistsofanumberofclasses.W-e'lllookateachoftheseprovidersshortly.DataProvid
3、erComponentsEach.NETdataproviderconsistsoffourmaincomponents:¨Connection–usedtoconnecttothedatasource¨Command–usedtoexecuteacommandagainstthedatasourceandretrieveaDataReaderorDataSet,ortoexecuteanINSERT,UPDATE,orDELETEcommandagainstthedatasource¨DataReader–aforward-only,read-onlyconnectedresu
4、ltset¨DataAdapter–usedtopopulateaDataSetwithdatafromthedatasource,andtoup-datethedatasourceNotethatthesecomponentsareimplementedseparatelybythe.NETproviders;ther-eisn'tasingleConnectionclass,forexample.Instead,theSQLServerandOLEDBpro-vidersimplementSqlConnectionandOleDbConnectionclassesrespec
5、tively.Theseclass-esderivedirectlyfromSystem.ComponentModel.Component–thereisn'tanabstractCo-nnectionclass–buttheyimplementthesameIDbConnectioninterface(intheSystem.D-atanamespace).TheConnectionClassesTheconnectionclassesareverysimilartotheADOConnectionobject,andlikethat,theyareusedtorepresen
6、taconnectiontoaspecificdatasource.TheconnectionclassesstoretheinformationthatADO.NETneedstoconnecttoadatasourceintheformofaf-amiliarconnectionstring(justasinADO).TheIDbConnectioninterface'sConnectionS-tringpropertyholdsinformationsuchastheusernameandpasswordoftheuser,thenameandlocationoftheda
7、tasourcetoconnectto,andsoon.Inaddition,theconnectionclass-esalsohavemethodsforopeningandclosingconnections,andforbeginningatransactio-n,andpropertiesforsettingthetimeoutperiodoftheconnectionandforreturningthecu-rrentstate(openorclosed)oftheco