How do I do this?

  • Thread starter Thread starter Calvin Lai
  • Start date Start date
C

Calvin Lai

Hi all,

Does anyone know how could I display a dialog box containing similiar info
as in odbcad32 and allows user to select one of the DSN from there? Thanks.
 
Calvin said:
Does anyone know how could I display a dialog box containing similiar
info as in odbcad32 and allows user to select one of the DSN from
there? Thanks.

Read the registry for ODBC DSNs. Pay special attention to any differences
between versions of windows (ie, the location may be different).

Then test, test, test. Make sure all users can access the keys, give
helpful error messages if something fails, etc...
 
But is that any API which I can call to display that box instead of writing
my own? Thanks.
 
Calvin said:
But is that any API which I can call to display that box instead of
writing my own? Thanks.

Yes there is.... I have only coded this in C, but here is a function you
should look into:

SQLRETURN SQLDataSources()

This is part of the ODBC APi I believe... I coded this several years ago,
so memory is fuzzy.

Anyway, it's a starting point.
 
Back
Top