资源描述:
《vb创建access数据库全解(vb to create access database solutions)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、vb创建access数据库全解(VBtocreateaccessdatabasesolutions)Thispapercontributedbyachm207.VBACCESSdatabasetocreatesolutionstocreatethedatabase,dynamicallycreatetable,createarecord,ADOADOX2010-01-2213:28Abstract:ThispaperdescribestheVBprogramusingADOdynamicmethodtocreatedatabaseanddatatable,thesemet
2、hodshavepracticalvalueindevelopingVBdatabaseapplication,itcanimprovetheflexibilityofdatabaseprogram.Keywords:database,datatable,ADO,ADOXThe1:problemInVisualBasic,dataaccessinterfacecommonlyusedarethefollowingthree:databaseaccessobject(DAOData,AccessObject),theremotedatabaseobjects(RDO,Rem
3、oteDataObject)andActiveX(ADO,ActiveX,DatadataobjectObject).Databaseaccesstechnologyhasbeeninprogress,differentstagesofdevelopmentandthesethreekindsofinterfaceeachrepresentthetechnology.ThelatestisADO,itismoresimplethanRDOandDAO,however,amoreflexibleobjectmodel.Becauseofthis,moreandmorepeo
4、pleuseADOasadataaccessinterfaceinVBwiththedevelopmentofdatabasesoftware.Inthedevelopmentprocess,weusuallyusethemethodistousethedatabasemanagementsystem(e.g.MicrosoftAccess)orVisDatainVBtoestablishadatabaseanddatatablestructure,andthenthroughtheuseofADODCdatabasecontrolorreferencetotheADOo
5、bjecttoestablishaconnectionwiththedatabasetableintheprogram,andthenthroughthedatabasecontrols(e.g.,textboxes,DataGridetc.)tocarryoutvariousoperationsofthedatabase.Inthisdevelopmentprocess,wesometimesneedtofacesuchaproblem:howtoallowuserstorunthedynamicprocesstobuildupthenecessarydatabases
6、anddatatablestoimprovetheflexibilityoftheprogram?Toestablishtheirownrequireddatabasesanddatatablesintherunningprocess,itsessenceistousecode(orprogrammed)tocreatedatabaseanddatatable.Aseveryoneknows,inFoxproorASPprogramming,thisisaveryeasything.ThentheVBdatabaseprogrammingandhowtooperateit
7、?TheVBdatabaseprogramming,ifyouuseDAOasdatabaseaccessinterfacetechnology,canbeachievedbyCreateDatabasecombinedwithCreateTableDefmethod,therearemanybooksandmagazinesaboutthisway,thisisnolongerabout;butifyouareusingthelatesttechnologyofADOdatabaseaccessinterface,youca