Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a list of DSN's......
Message
De
16/01/2003 21:04:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Getting a list of DSN's......
Divers
Thread ID:
00742712
Message ID:
00742712
Vues:
61
Hi everyone,

Well, time to try something new - for me. Anyway, I want to search the registry and find out all of the DSN's which are available and then drop them into an array (arrMyDsn). To be honest, I don't use the registry class that much so there is a lot I don't know. I do use it (the registry) to return things like if there is an application installed, but that is about it. I have looked up all of the threads on this subject, and read them; and even went to the downloads as some of them suggested, but there does not seem to be a 'help file' per say which details what to ask the registry to return. So, let me put down a guess on what I want to do and don't be shy about responding and telling me 'no silly, it should be this way...'... TIA

Ric

PS. Thanks to the many threads I went through to get this far... especially Mark McCasland
*-- Assume registry object exists (default foundation class of VFP 7.0)
*-- So, oRegistry is an object
LOCAL lcRHKey, lcRSubKey, lcDSNName, laVals[1,2]
*-- now, I found some DSN's here in the registry
lcRHKey   = HKEY_CURRENT_USER
lcRSubKey = "Software\ODBC\ODBC.INI\"
*-- Here is what I don't know....

lcDSNName = oRegistry.GetEnumValues(@laVals, lcRegHKey, lcRegSubKey)
*-- This does not work at all... I'm thinking I need to put in a for each loItem type thingy, but not sure...

RETURN lcDSNName
Thank you very much...

Ric
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform