您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 电子商务 > !VB程序中将照片批量导入Access数据库的简单方法
。。、“=”。ADODBStream。Stream。Access、DATAImage。1VBDATADATAVBADODCADODB。。DATADatabaseNameRecordSource。DatabaseNameDATA。RecordSourceDATA。DATA、、。DATA1xsxsxxDataSourceDATA1DataField“”DATA1“”。。DATAAc-cess2003VBSP5SP6。SP5VBDATAAccess97。VB。2ImageImageVB。PictureStretch。PictureLoadPicture()。StretchTrueImage。3xs.mdbxsxx、、。DATA1DatabaseNameRecordSourceDATA1xs.mdbxsxxImage1DataSourceDataFieldImage1“”。E:\PicVBAccess034000。ADODB。VBDATAIMAGEAccess。DATAIMAGEVBProcedureEasiestWaytoImportaLargeofPhotostoAccessDatabaseZHOURuiDept.Computer,XinzhouVocationalandTechnicalCollege,Xinzhou034000Abstract:Atpresent,manyinformationmanagementsystemshavephotoinformation,information,informationonhowalargenumberofphotosintothedatabase,itbecomesaproblem.Inthispaper,thereareanumberofinteractiveoptionstoimportphotosleaflets,efficiencyisnothigh,andisusedintheadvancedmethodsofADODB.Theauthorinthemostsimplesolu-tiontotheproblemofprinciple,themosteasy-to-useVBcontrolofDATAandIMAGEobjectsboundobjectcontrolmeth-ods,throughthecycleofcleverlyachievedalargenumberofphotostoimportbulkdataACCESSdatabase.Keywords:DATAControl;DataBase;IMAGEControl;Photos2009-9-2054--DATABASEANDINFORMATIONMANAGEMENTtext4text10Binary10001000200032Data1DatabaseNameE:\xsgl\xs.mdbRecordSourcexsxxText1DataSourceData1DataFieldText2DataSourceData1DataFieldImage1DataSourceData1DataFieldCommand3caption3“+”“0001”。Image1.Picture=LoadPicture()“”。0002“”Image1.Picture=Load-Picture(“E:\Pic\0002.JPG”)。41VBE:\xsglACCESSxs.mdbxsxx12。2E\Pic1~2。31。13。2PrivateSubCommand3_Click()DimZpmasStringOnErrorGoToERR_zpWhile(NotData1.Recordset.BOF)And(NotData1.Recordset.EOF)IfIsNull(Data1.Recordset())Then'Zpm=“E:\pic\”&Trim(Data1.Recordset())&Trim(Data1.Recordset())&.JPGIfLen(Dir(Zpm))0Then'Image1.Picture=LoadPicture(Zpm)EndIfEndIfData1.Recordset.MoveNextWendERR_zp:IfErr.Number0ThenMsgBoxErr.DescriptionErr.ClearEndSubTRIM。“”“”Data1.Recordset.MovePreviousData1.Recordset.MoveNextIMAGE。5“E\Pic”Zpm“E:\pic\”。.JPG.BMP.Gif“JPG”。。、。1972-。155--
本文标题:!VB程序中将照片批量导入Access数据库的简单方法
链接地址:https://www.777doc.com/doc-5498985 .html