Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting datPrimaryRS properties at runtime
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00220207
Message ID:
00220631
Vues:
43
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform