Hi all.
I have developed a simple VB.NET app that displays some data from an Access database. No updating, just reading the data.
I want to distribute the db with the installation, I know how to include it in the user's application folder, but how do I make the app know where to look once it's installed (maybe |DataDirectory| )
I've been searching through other postings for a few days, but they all seem to be using VS 2005...
Thanks for any help!
P.S. I'm using Visual Studio 2003

Access DB distribution
bk13
Alvin Kuiper
DataDirectory is new to 2005. Where are you installing the database If it's in your application folder or in an application subfolder you could use Application.StartupPath.
nabeelfarid
Thanks!
That answers my question.
zviaa
Rafet
Yes, you can use it when building your connection string if it's in the same folder as your application executable:
Dim ConnectionString As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\MyDB.mdb"
Espriella
Dim ConnectionString As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDB.mdb"