Hello I am fairly new at VB .net but I did manage to built myself a cool interface for a Movie database storing all the information in access using the following code to connect on form load.
Private ObjOleDbConnection As OleDbConnection
Private Connection As OleDbConnection
Private objOleDbCommand As OleDbCommand
Private objOleDbDataReader As OleDbDataReader
Const g_strConnectionstring As String = "Provider=Microsoft.jet.OLEDB.4.0;" & _
"Data source=\My Movie database\Database\Moviedatabase.mdb"
My problem is when I built my application setting it up with a installer the connection string will change base on where the user installs the program. Is there a way to go around this? Basically the database name will always be the same but the path will change depending on th users preference.
Thank you,
Private ObjOleDbConnection As OleDbConnection
Private Connection As OleDbConnection
Private objOleDbCommand As OleDbCommand
Private objOleDbDataReader As OleDbDataReader
Const g_strConnectionstring As String = "Provider=Microsoft.jet.OLEDB.4.0;" & _
"Data source=\My Movie database\Database\Moviedatabase.mdb"
My problem is when I built my application setting it up with a installer the connection string will change base on where the user installs the program. Is there a way to go around this? Basically the database name will always be the same but the path will change depending on th users preference.
Thank you,