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