Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConfigDataSource problem
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00111019
Message ID:
00111344
Views:
34
>Hi Mark,
>
>Cool! I need to do this myself. What's lnInt1 for? I don't see it referenced anywhere else.
>
>Also, if you don't mind, could you post the code that checks for the existence of a DNS registry entry?

Sorry, the lnInt1 should have been removed. I had been using that as the first parameter in the SQLConfigDataSource() function.

The code I use to check the Win95 registry is in the Files section of the UT under Classes/VCX, Registry.zip. This file was uploaded by Rick Strahl of West Wind Technologies.

I set up the following in my application to use the registry.prg functions:
#Include registry.h
set procedure to registry
oRegistry=CREATE("Registry")
DIMENSION taVals[1,2]
lcRegSubKey = "SOFTWARE\ODBC\ODBCINST.INI\Microsoft ODBC for Oracle"
lcRegHKey = HKEY_LOCAL_MACHINE
lnVals=oRegistry.GetEnumValues(@taVals, lcRegHKey, lcRegSubKey)

I modified Rick's code to take out the example code. I left all the constant definitions in the registry.prg.

The lcRegSubKey and lcRegHKey is where the ODBC DSN information can be found in the Win95 registry if you browse it with Regedit.exe utility.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform