[RESOLVED] Database Location
Hi All, :sick:
I wrote a VB6 program wherein I am storing a number of public variables in a very simple access database. My questions:
1. Once I distribute the program, how can I tell the program where the Access program is located in the end user's computer if I don't know in which directory the user installed Access.
2. What happens if the user does not have Access in their computer and my program calls Access? Will my program crash?
I appreciate your help.
Ace
Re: [RESOLVED] Database Location
Quote:
simply putting the path of the database into your connection string (probably using App.Path - which is the same folder as your program)
so how would I actually input that? right now it looks like this
VB Code:
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= C:\Documents and Settings\Owner\My Documents\BB\Congo VB\db1.mdb"
so how would I use the "App.Path"?
thanks
Re: [RESOLVED] Database Location
By using simple string manipulation. ;)
VB Code:
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=[u]" & App.Path & "[/u]\db1.mdb"
Re: [RESOLVED] Database Location