Hi,
I am creating a small application which connects to an MS access database.
I am using app to get the path of the mdb. This works fine when I am accessing the exe from my own machine.
When I share the folder containing the exe and access it over the LAN, app looks for the mdb in the client machine. How do I reference the mdb on server?
Following is the code for db connection:
'Module to connect to the database.
Sub db_connect()
Dim AccessConnect As String
Dim sPath As String
sPath = App.Path & "/../MasterDB"
AccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=My_Master.mdb;" & _
"DefaultDir=" & sPath & ";" & _
"Uid=;Pwd=test123;"
con.ConnectionString = AccessConnect
con.Open
End Sub
Can anyone please guide me ahead?
Regards,
ss