vb.net - How to create a copy of mdb access and convert it's copy into csv on a same folder? -
conns = new oledb.oledbconnection("provider=microsoft.jet.oledb.4.0;" & "data source=" + newpath + "\ddcos.mdb")
if not file.exists(newpath + "\ddcos.mdb") catnewdb.create("provider=microsoft.jet.oledb.4.0;" & "data source=" + newpath + "\ddcos.mdb") dim cmdd new oledb.oledbcommand("create table ddcos( " & _ "recnum int identity," & "zipfile nvarchar(50)," & "dvdname nvarchar(50)," & "seqno1 nvarchar(50)," & "seqno2 nvarchar(50)," & _ "jobcode nvarchar(50)," & "clientcode nvarchar(50)," & "totalimages nvarchar(50)," & "totalrecs nvarchar(50)," & "batchcount nvarchar(50)," & "batchdate nvarchar(50)," & "batchsize nvarchar(50)," & "constraint [pk_recnum] primary key (recnum)) ", conns) conns.open() cmdd.executenonquery() conns.close() gc.collect() gc.waitforpendingfinalizers() end if
the above code code on creating database. , i'm create copy on , convert copy csv. can help?
dim countofmdb = directory.enumeratefiles(path, "*.mdb").count()
or
dim countofmdb = directory.getfiles(path, "*.mdb").length
if want include sub-directories:
dim countofmdb = directory.getfiles(path, "*.mdb", system.io.searchoption.alldirectories).length
Comments
Post a Comment