D
Didymus
Hi everyone,
How would I adjust the following ConnectionString to point to the
applications installed path?
===
Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=SOME
DRIVE\SOME DIRECTORY\THE DATABASE;Mode=Share Deny None;Extended
Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet
OLEDBatabase Password="";Jet OLEDB:Engine Type=5;Jet OLEDBatabase
Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDBon't Copy Locale
on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False
===
I want the user to be able to install the application wherever they want,
and I need the ConnectionString to point to that location.
I have no problem getting the Application.StartupPath.
I have tried to split the ConnectionString into two seperate strings and
concatenate the strings and Application.Path together, but it doesn't seem
to work.
This is what I have tried...
It seems to mess up the DoubleQuotes in the strings.
///
Dim AppPath As String = Application.StartupPath
Dim conString1 As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source="
Dim conString2 As String = "\THE DATABASE;Mode=Share Deny None;Extended
Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet
OLEDBatabase Password="";Jet OLEDB:Engine Type=5;Jet OLEDBatabase
Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDBon't Copy Locale
on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False"
Dim conString As String = conString1 & AppPath & conString2
///
Thanks in advance,
Gary
How would I adjust the following ConnectionString to point to the
applications installed path?
===
Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=SOME
DRIVE\SOME DIRECTORY\THE DATABASE;Mode=Share Deny None;Extended
Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet
OLEDBatabase Password="";Jet OLEDB:Engine Type=5;Jet OLEDBatabase
Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDBon't Copy Locale
on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False
===
I want the user to be able to install the application wherever they want,
and I need the ConnectionString to point to that location.
I have no problem getting the Application.StartupPath.
I have tried to split the ConnectionString into two seperate strings and
concatenate the strings and Application.Path together, but it doesn't seem
to work.
This is what I have tried...
It seems to mess up the DoubleQuotes in the strings.
///
Dim AppPath As String = Application.StartupPath
Dim conString1 As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source="
Dim conString2 As String = "\THE DATABASE;Mode=Share Deny None;Extended
Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet
OLEDBatabase Password="";Jet OLEDB:Engine Type=5;Jet OLEDBatabase
Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDBon't Copy Locale
on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False"
Dim conString As String = conString1 & AppPath & conString2
///
Thanks in advance,
Gary