G
Guest
I set up an OLEDB connection, adapter, and dataset on my opening form.
I want to input the Data Source and replace the DS supplied at design time
with a string variable (I will probably use an OpenFileDialog). Where do I
put the file dialog ? Another question, how do I make this
connection/adapter/DS available on my other forms ? Do I have to close the
connection and reopen it as I enter each form ? MANY THANKS for any help.
The way things are right now is as follows:
In #Region " Windows Form Designer generated code "
The following is generated:
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=""C:\Documents and Settings\bgb\My
Documents\Visual Stu" & _
"dio Projects\SourceKeeper\SourceKeeper\bin\CodeKeeper.mdb"";Jet
OLEDB:Engine Type" & _
"=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System
database=;Jet OLEDB:SFP=F" & _
"alse;persist security info=False;Extended Properties=;Mode=Share
Deny None;Jet O" & _
"LEDB:Encrypt Database=False;Jet OLEDB:Create System
Database=False;Jet OLEDBon" & _
"'t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;U" & _
"ser ID=Admin;Jet OLEDB:Global Bulk Transactions=1"
I want to input the Data Source and replace the DS supplied at design time
with a string variable (I will probably use an OpenFileDialog). Where do I
put the file dialog ? Another question, how do I make this
connection/adapter/DS available on my other forms ? Do I have to close the
connection and reopen it as I enter each form ? MANY THANKS for any help.
The way things are right now is as follows:
In #Region " Windows Form Designer generated code "
The following is generated:
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=""C:\Documents and Settings\bgb\My
Documents\Visual Stu" & _
"dio Projects\SourceKeeper\SourceKeeper\bin\CodeKeeper.mdb"";Jet
OLEDB:Engine Type" & _
"=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System
database=;Jet OLEDB:SFP=F" & _
"alse;persist security info=False;Extended Properties=;Mode=Share
Deny None;Jet O" & _
"LEDB:Encrypt Database=False;Jet OLEDB:Create System
Database=False;Jet OLEDBon" & _
"'t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;U" & _
"ser ID=Admin;Jet OLEDB:Global Bulk Transactions=1"