April 20th, 2004, 01:00 PM
Join Date: Apr 2004
Time spent in forums: < 1 sec
Reputation Power: 0
data source during deployment
If your database is in the same folder where your application executable is, then dont hardcode your database path while connecting the string.
Instead, get the path of your application using:-
Dim Str1 as string = Path.GetDirectoryName(Application.ExecutablePath)
concatenate the string with ur database like this:-
Str1 = Str1 & "\MyDatabase.mdb"
and then connect with this Str1.
While making deployment project, make sure the database is in the same folder where ur application executable is.
It will ask for the path when Joe installs ur application. wherever he installs ur application, it also puts ur database there. And conncects to the database using the Str1 string.
Try this one...