` Printed Icetips Article

Icetips Article



SQL Related Articles: Selecting ODBC datasource using Registry
2002-11-20 -- Tim Morrison
 
Newsgroups: comp.lang.clarion

This is what I ended up doing.

I am using the Registry Function Library.

Loc:Connect = 'SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources'
Loc:Key = OpenKey(HKEY_LOCAL_MACHINE,Loc:Connect)
IF Loc:Key = 0
    !Your Own Error Processing
ELSE
    EnumReg(Loc:Key,Q) !Populates a Queue (See Below)
END
CloseKey(Loc:Key)
ThisWindow.Reset(1)

Loc:Connect = CSTRING(101)
Loc:Key = ULONG

Q                    queue,type
Name                    string(255)
Type                      byte
Value                     any
                       end

The "Name" is all I really need, then I can do some processing based on what
the user selected.

Tim Morrison


"Tim Morrison"  wrote in message
news:3dda6f79$1@news.softvelocity.com...
> CW5.5EE ABC
>
> Is there a way to create a dialog in which the user can select from a list
> of DSN's defined on the users system?
>
> TIA
>
> Tim Morrison
>
>



Printed November 21, 2024, 12:08 pm
This article has been viewed/printed 35242 times.
Google search has resulted in 36 hits on this article since January 25, 2004.