Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a list of DSN's......
Message
From
16/01/2003 21:04:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Getting a list of DSN's......
Miscellaneous
Thread ID:
00742712
Message ID:
00742712
Views:
60
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
Next
Reply
Map
View

Click here to load this message in the networking platform