i get this error
Format of the initialization string does not conform to specification starting at index 34.
when i take my connection string and store it in the project settings. I know that this works
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb
because if i use it like this
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb")
conn.Open()
the connection succeeds but if i try this
Dim conn As New OleDbConnection(My.Settings.Default.employeeConnection) conn.Open()
i get that error.
What am i doing wrong?
sorry i forgot to mention the settings
name:employeeConnection
type:string
scope:application
value:Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb

New Topic/Question
Reply



MultiQuote




|