资源描述:
《asp事务处理(asp transaction processing)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、asp事务处理(ASPtransactionprocessing)ASPtransaction.Txtwhatismyth?Listentomenexpresslovetoyou.Whatisthelegend?Listentotheman'spromisetoyou.Whatisadream?Seehowyoureactwhenyouhearthefirsttwo.UsingASPtoimplementtransactionprocessingmethods,selectBlogfromAppl
2、eBBSKeywordimplementstransactionprocessingusingASPSourceInthedevelopmentofWebapplications,withoutexception,youneedtoaccessthedatabase,tocompletethedataquery,insert,update,deleteandotheroperations.Affectedbytheapplicationlogic,sometimesanumberofdatabas
3、eoperatinginstructionsarerequiredtoformaworkunit(transaction).Inadatabase,whatiscalledatransactionisasetoflogicaloperationsunitsthattransformdatafromonestatetoanother.Inordertoensuretheconsistencyofthedatainthedatabase,shoulduselogicalunitoperationdat
4、aofdiscretegroup:whenitiscompleted,thedataconsistencycanbemaintained;andwhentheunitisapartoftheoperationfails,theentiretransactionwillbecompletelyignored,allfromthestartingpointaftertheoperationarereturnedtothestartstate.Infact,bydefault,eachoperation
5、ofthedatabaseisimplicittransactionprocessing.Thispapertakesatypicaluserregistrationprocessasanexample,thispaperintroducesthreemethodstorealizethetransactionusingASP:Basedonthesolution,theASPdatabasebasedoncomponentsolutionswithinthedatabasetransaction
6、processingmechanismandbasedonthesolvingmethodofMTScomponents.ProgramfunctionCreatetwotablesintheSQLServerdatabase:theUSERtableandtheUSERDOCtable.IntheUSERtable,theusernameandpasswordoftheregistereduserarestored,andthepersonaldataoftheregistereduseriss
7、toredintheUSERDOCtable,andtheusernameisusedastheindex.HerearethedefinitionsfortablesUSERandUSERDOC:Create,Table,USER(userName,varchar(30),userPasswd,varchar(30))Create,Table,USERDOC(userName,varchar(30),Age,int,Sex,int,PhoneNumber,varchar(20),Address,
8、varchar(50))Whentheuserasksforregistration,theASPscriptinsertstheusernameandpasswordintotheUSERtable,theninsertstheuser'spersonalinformation(age,sex,contactnumber,homeaddress,etc.)intheUSERDOCtable.Atthesametime,theapplicationmustalsoensuretha