Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 760
  • Last Modified:

Opening Access 2010 database with VB.Net 2008

I use this to open earlier versions of access.  Obviously doesn't work with Access 2010.  How do you open an "accde" file with vb.net?  Do you have to convert it to a .mde or .mdb first?  

Dim objAccess As Access.Application
objAccess = New Access.ApplicationClass()
objAccess.OpenCurrentDatabase("database path", False, "")

objAccess.Quit(Option:=Access.AcQuitOption.acQuitSaveNone)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oAccess)
objAccess = Nothing

Any help would be great!

Thanks.

Jim
0
transstates
Asked:
transstates
  • 3
  • 2
2 Solutions
 
DhaestCommented:
What do you want to do ? I don't recommend to use access.application, ... but use ado.net

See Data Programming with Access 2010

http://msdn.microsoft.com/en-us/library/ff965871.aspx
0
 
transstatesAuthor Commented:
Thanks for the help.

What I'm trying to do is just open and access database, "accde" file.  This db contains a list of reports to print.  So I just need to open it and then close the msaccess.exe when the user is finished.

0
 
transstatesAuthor Commented:
When this access database opens, it has a startup form that will guide the user the rest of the way. I just need to open it like you would a regular .mdb.  The above code opens the startup form for previous versions of access.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
CodeCruiserCommented:
Did you try Process.Start("path of the file")?
0
 
transstatesAuthor Commented:
Dhaest, I only gave lower points becuase the process.start actually did what I need for the quick fix.  Your link is very helpful for doing more work with access.  

I thank you both so much for the help!!

Jim
0
 
CodeCruiserCommented:
Glad to help :-)
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now