Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enumerate OLEDB Providers
Message
From
13/12/2001 14:44:27
 
 
To
13/12/2001 14:18:58
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00593614
Message ID:
00594006
Views:
33
>>Thanks a bunch. Your timing was absolutely perfect. I was just cracking my knuckles to write something like this when "Reply" chimed on my workstation.
>>
>>I made one slight change to make the search EXACT and case-insensitive (VFP7-specific):
>>
lFound = (ASCAN(aKeyVals, "OLE DB Provider", -1, -1, 0, 7) <> 0)
Again, thanks for saving me a chunk of work.
>
>No problem and thanks for the addition. Did you find any providers that weren't found by the routine?
>
>The list should be the same as what the data link edit/create dialog shows. (for example when you open a .udl file)

No, I didn't find any others. I'm not going through all those classes individually - I just used the Search in RegEdit.

Yes, the list is the same as the Data Link dialog. Clearly, your code duplicates its functionality.

I think the only issues might be:
- if the registry entries for OLE DB 3.0 change significantly the routine will break. Hooking into the OLE DB enumerator would help here because an upgrade to a new version would also include new enumerator(s).
- apparently the OLE DB enumerator can enumerate other enumerators (what a mouthful) so 3rd parties could use different registry structures, as long as their enumerator could be found by MS's. Don't know how important this is in the real world.

I found a VB sample for the Data Link API yesterday and I tried playing around with it a bit: http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9640

I could only get as far as
oDataLink = CREATEOBJECTEX("MSDASC.MSDAINITIALIZE", "", "")
which runs, and Intellisense shows some methods, but the only docs for the methods were C++ and looked pretty ugly.

BTW I added some comments to your code - I don't know how far along you are with your UT upload but I could send you the modified version if you wish.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform