ReportsNerd
Active member
- Joined
- Nov 24, 2012
- Messages
- 31
- Programming Experience
- 3-5
Hi, I am getting an unhandled exception on my connection string line below when running. Not sure what the issue is, but I get the following message when running from VS 2010 Pro:
Format of the initialization string does not conform to specification starting at index 33.
Code:
Private Sub Menu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbSource = "C:\Users\Lynne\documents\visual studio 2010\Projects\DT\DT\TestDB1.accdb"
con.ConnectionString = dbProvider & dbSource
con.Open()
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "Debtors")
len = da.Fill(ds, "Debtors")
End Sub
Also, is there a way I can shorten the dbSoruce line since I have included the MS Access database in my project?
Help appreciated.
Thanks.
Format of the initialization string does not conform to specification starting at index 33.
Code:
Private Sub Menu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbSource = "C:\Users\Lynne\documents\visual studio 2010\Projects\DT\DT\TestDB1.accdb"
con.ConnectionString = dbProvider & dbSource
con.Open()
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "Debtors")
len = da.Fill(ds, "Debtors")
End Sub
Also, is there a way I can shorten the dbSoruce line since I have included the MS Access database in my project?
Help appreciated.
Thanks.