Problem saving database path

  • Thread starter Thread starter ahmeddc
  • Start date Start date
A

ahmeddc

Guest
hi

I save the database path after selecting the user
Problem Connection statement does not work with the saved path read from registry


If you make a direct path connection to this format "D:\", it works well

Public con As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & "D:\" & "\DATABASE.accdb;Jet OLEDB:Database Password=" & PASS)


If you connect to a variable with the path, the connection code does not work

Public pathe As String = My.Computer.Registry.CurrentUser.GetValue("path")

Public con As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & pathe & "\DATABASE.accdb;Jet OLEDB:Database Password=" & PASS)
I checked pathe with registry by letter and shows well in MsgBox

Continue reading...
 

Similar threads

Back
Top