After deploying my project, I tried to install it on other pc , it installs well but whenever i run the .exe application my database file which is MS Access cannot be found. Well obviously the path is the problem.
How would i make my path flexible and so that whenever i install it to other pc, my database will already be found. And also how can i include the database file inside the installer.
Really need your help!...Simple codes will be great. I'm just a beginner.
This is the code i used for the path
Sub ConnectRecord(ByVal sql As String)
Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & GetMyMDBPath() & "TanProj.MDB"
Dim dataAdapter As New _
OleDb.OleDbDataAdapter(sql, connStr)
dataAdapter.Fill(dt)
dataAdapter.Dispose()
End Sub
Function GetMyMDBPath()
GetMyMDBPath = "C:\Users\user\Desktop\"
End Function