Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting datPrimaryRS properties at runtime
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00220207
Message ID:
00220631
Views:
44
Thanx Jean-Marc,
here it is:
The Path File-

Sub main()
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile("c:\windows\mypath.ini")
mPath = a.readline <<<-----set the variable
frmPartMaster.Show vbModal
End Sub

...and here's the ADO connection:

Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
With db
.Provider = "Microsoft.Jet.OLEDB.3.51"
.ConnectionString = mPath <<<------here's the variable!
.Open
End With

thanx again,
John Morga
jmorga@telephonics.com


>>Hi,
>>My app sets a variable, mPath, to the PATH of my Access database from an .INI file
>../..
>>What is a good way to do this? Can the ConnectString property be altered at runtime?
>
>No. You'll have to alter datPrimaryRS.DataBaseName at the beginning of your program (into Form_Load for instance)
>
>HTH
John Morga
Sr. Manager Information Systems
Applications Development Group
Systems Engineer
Telephonics Corporation
http://www.telephonics.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform