Reputation: 3825
I want to open a mdb file through VB.NET
Currently, I use:
retval = shell("explorer.exe " & filename)
where filename includes the path. It should open the mdb file in Microsoft Access.
This works fine on Windows 7 (my system), but when I try it on Windows XP (client machine) it comes up with the file download security warning dialog asking to Open, Save or Cancel. If I click Open it presents the same dialog but now with Save and Cancel only.
I am sure there is a quick and easy way to open a file in its proper program through VB.NET. I know I can open the database using Interop, but I don't want to go down that route.
Thanks
Upvotes: 0
Views: 5229
Reputation: 22266
You can use Process.Start
to launch a program. Some good examples here: http://www.dotnetperls.com/process-start-vbnet
For example:
System.Diagnostics.Process.Start("database.mdb")
Upvotes: 1