P
pooba53
Take a peek at this connection string to an Access db from VB .NET
2003:
'OleDbConnection1
'
Dim AppBase As String
AppBase = AppDomain.CurrentDomain.BaseDirectory & "data.mdb"
MsgBox(AppBase)
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=""AppBase"";Jet OLEDB:Engine
Type=5;Provider=""Mic" & _
"rosoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;persist sec" & _
"urity info=False;Extended Properties=;Mode=Share Deny
None;Jet OLEDB:Encrypt Dat" & _
"abase=False;Jet OLEDB:Create System Database=False;Jet
OLEDBon't Copy Locale o" & _
"n Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;User ID=Admin;Jet" & _
" OLEDB:Global Bulk Transactions=1"
AppBase correctly displays the complete path string to my Access db.
Note that when I use it as the "Data Source=", it does not seem to
find the db. I don't get it...if I hard code the path it works!
Driving me nuts ;-)
Thanks.
2003:
'OleDbConnection1
'
Dim AppBase As String
AppBase = AppDomain.CurrentDomain.BaseDirectory & "data.mdb"
MsgBox(AppBase)
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=""AppBase"";Jet OLEDB:Engine
Type=5;Provider=""Mic" & _
"rosoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;persist sec" & _
"urity info=False;Extended Properties=;Mode=Share Deny
None;Jet OLEDB:Encrypt Dat" & _
"abase=False;Jet OLEDB:Create System Database=False;Jet
OLEDBon't Copy Locale o" & _
"n Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;User ID=Admin;Jet" & _
" OLEDB:Global Bulk Transactions=1"
AppBase correctly displays the complete path string to my Access db.
Note that when I use it as the "Data Source=", it does not seem to
find the db. I don't get it...if I hard code the path it works!
Driving me nuts ;-)
Thanks.