P
pooba53
Take a gander:
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"
I would like to use a string contained in a variable for the Data
Source in the above example. In the above example the variable is
called "AppBase". No matter what I do with regard to quotes, no
quotes, single quotes, etc. the value of the string is never
substituted in. It remains "AppBase".
Is there some syntax that will allow me to use the contents of a
variable in my connection string?
Thanks.
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"
I would like to use a string contained in a variable for the Data
Source in the above example. In the above example the variable is
called "AppBase". No matter what I do with regard to quotes, no
quotes, single quotes, etc. the value of the string is never
substituted in. It remains "AppBase".
Is there some syntax that will allow me to use the contents of a
variable in my connection string?
Thanks.