How to avoid having to refresh my Database connection every Time. (VB)

piscis

Well-known member
Joined
Jun 30, 2003
Messages
54
How to avoid having to refresh my Database connection every Time.

This is the code generated by Windows.

It seems like every time I change the folders name I need to refresh my Database connection, how can I avoid this how Can I change this code to have the program always look in the applications folders named DATA rigth on the applications path?



code:--------------------------------------------------------------------------------OleDbConnection1

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\Telemetrika.Com\My Document" & _

"s\Zanussi Brio 250 Software\Data\BrioDatabase v1.3.mdb"";Mode=Share Deny None;Jet" & _

" OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System databas" & _

"e=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Jet OLED" & _

"B:Compact Without Replica Repair=False;Jet OLEDB:Encrypt Database=False;Jet OLED" & _

"B:Create System Database=False;Jet OLEDBont Copy Locale on Compact=False;User" & _

" ID=Admin;Jet OLEDB:Global Bulk Transactions=1"
 
Where you set the datasource instead of putting the complete path in use ....

Code:
application.StartupPath & "\data\BrioDatabase v1.3.mdb"

Andy
 
Back
Top