毕业论文外文文献翻译VB的数据库编程分析及数据库的发展应用和基本原理.docx
《毕业论文外文文献翻译VB的数据库编程分析及数据库的发展应用和基本原理.docx》由会员分享,可在线阅读,更多相关《毕业论文外文文献翻译VB的数据库编程分析及数据库的发展应用和基本原理.docx(14页珍藏版)》请在冰豆网上搜索。
毕业论文外文文献翻译VB的数据库编程分析及数据库的发展应用和基本原理
毕业设计(论文)
外文文献翻译
文献、资料中文题目:
1.VB的数据库编程分析
2.数据库的发展、应用和基本原理
文献、资料英文题目:
文献、资料来源:
文献、资料发表(出版)日期:
院(部):
专业:
软件工程
班级:
姓名:
学号:
指导教师:
翻译日期:
2017.02.14
学生公寓智能化管理系统——学生与房间管理子系统外文文献及翻译
专业:
软件工程
ANALYSISOFDATABASEPROGRAMMINGINVB
VB(VisualBasic)isavisualizationprogrammingenvironmentthatMicrosoftCorporationpromotesbasedontheBasiclanguage.Itissimpleandeasytostudy.Ithasformidablefunctionsothatmanycomputeramateursreallylikeit.AlotofapplicationsoftwaresalluseVBasthesoftwaredevelopmentplatform.WhenweuseVBtodeveloptheapplicationsoftware,howtousethedatabaseandcarryonthemanagementofthedatabaseisconcernedbyallexploiters.VBhasprovidedmanytoolsandmethodsfordatabaseprogramming.Whatmethodisusedtovisitthedatabasedependsonusers’differentdemands,asimpleanalysisoftheVBdatabaseprogrammingisexplainedasfollowings.
1.DAOTechnology
ByusingMicrosoftcompany’sJetDatabaseEngine(Jetdatabaseengine),DAO(DataAccessObject)thetechnologymainlyprovidesvisittoISAM(smoothindexsearchmethod)typedatabase,suchastherealizationofthevisittodatabaselikeFoxPro,Access,Dbase.
1.1UseDataControls
Datacontrolsareproducedbyusing“Data”buttoninthetoolbox.Ithas3basicattributes:
Connect,DatabaseNameandRecordSource.Connectattributespecifysthedatabasetypethatdatacontrolsvisit,thedefaultdatabaseistheAccessdatabase.ThevalueoftheDatabaseNameattributeisthedatabasefilenamewhichcontainsthecompletepath.TheRecordSourceattributeistherecordsetthatwevisit,alsocanbetablesorSQLsentences.IfwewillvisittablestudofdatabasefileteachermdbofTEMPfolderunderDplate,thenDatacontrols’sConnectattributeisnull,andtheDatabaseNameattributeis“D:
\temp\teachermdb”,thevalueoftheRecordSourceattributeis“stud”.ThiscanaccomplishthebindingbetweenDatacontrolsanddatabaserecords.ThroughthemethodsofDatacontrolslikeAddnew,Update,Delete,Movelast,wecanvisitthedatabaseaseveryrequest.Whenwebrowsethecontentindatabase,DatacontrollsisusedfrequentlywithDBGrid,itprovidesdatainquiryingridway.
1.2UseDAOObjectStorehouse
ThemodeloftheDAOobjectstorehouseismainlyusinghierarchicalstructure,Dentineistheobjectinthetopmoststory,belowitaretwoobjectsets,Errorsandworkspace,undertheworkspaceobject,istheDatabasesset.WhentheapplicationprocedurequotestheDAOobjectstorehouse,itproducesonlyaDentineobject,andproducesadefaultautomaticalworkingspaceobjectnamedworkspace.Whennotmentioned,alldatabaseoperationsareallworkinworkspace(0),whichisadefaultworkarea.Butwemustpayattention:
TheJetenginewillnotstartsautomaticallyafterVBhasbeenloaded.OnlywhenwechooseReferencesinthemenuofProjectcanweselectMicrosoftDAO3.5ObjectLibrarytouse.Wecreatedatabaseswiththemethod“CreateDatabase”inDAO,use“CreateTable”methodtobulidtables,usethe“OpenDatabase”toopenthedatabase,use“Openrecordset”methodtoopenrecordset,useAddnew,Update,Delete,Movefirst,Editmethodstorealizeeachkindofoperationsabouttables.
2.RDOTechnology
RDOprovidesaconnectiontorelatedODBCdatapool.WhenweneedtovisitotherdatabaseslikeSQLServer,Oracle,especiallytoestablishthecustomer/serverapplicationprocedure,wemayusethelongrangedatacontrolsRDC(RemoteDataControl)andlongrangedataobjectsRDO(RemoteDataControl)torealizethevisittothedatabasethroughtheODBCdriver.
ByusingODBCtovisitsomedatabasewemustfirstinstallthecorrespondingdrivers,likeestablishadatapool,throughassigneddatapooltovisitcorrespondingdatabase.ToestablishtheODBCdatapoolisopenthewindowof“thecontrolpanel”,double-clickstheiconofODBCexecutiveprogram,single-click“Add”buttontocreatethedatapooloftheopeningODBCdatapoolsupervisordialogbox,andchoosecorrespondingdatabase.
2.1UseRDCControls
SimilartotheuseofDATAControls,weuseDatasourcenameattributestoassignthedatasourcenamethatcontrolsbind,andweuseSQLattributestoassigntherecordset,Thedifferenceisthat,wehavetousetheSQLsentencestoassigntheSQLattributeinRDCControls.WhenwebrowsethedatabasewemayfinditisusedwithDBGridfrequently.
2.2UseRDOObjectStorehouse
BeforeweuseRDOobject,weshouldchooseReferencesinthemenuofProject,click”MicrosoftRemoteDataObject2.0”,thenwecancontinue.
ThestepweuseRDOtovisittheODBCdatapoolis:
(1)SetaRDOenvironmentobject.
(2)OpenanODBCdatapoolwiththemethodofOpenconnection.
(3)EstablisharesultobjectwiththemethodofOpenResultset.
(4)Useassignedmethodtooperatetherecordsofresultset.
Aft