Reputation: 45
I need to convert old .mdb Access files to the new .accdb format. What's the best way to do this in vb.net?
Upvotes: 1
Views: 1373
Reputation: 94645
Use Office InterOp
to instantiate Application
of Access and try to open .mdb, file then save it using SysCmd method.
Honestly, I didn't tried so far yet but here are some undocumented sysCmd code but there is a simple approach to convert .mdb to .acccdb via ConvertAccessProject
method.
app = new Application()
src ="c:\csnet\file.mdb"
dst= "c:\csnet\file.accdb"
app.ConvertAccessProject(src, dst, AcFileFormat.acFileFormatAccess2007)
app.Quit()
Upvotes: 2