Retrieving ODBC Settings Programmatically.

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm having some issues grabbing ODBC Settings. First off I need to present a
user with the options to select thier DSN, Server, UID, PWD, and Database
settings. I have come up with a way using the SQLBrowseConnect function to
obtain the Server and Database information I need. Therefore, I have a semi
working version of the program.

I just need a way to make the program a little more user
friendly/fool-proof. I know that there is an option in the ODBC settings to
set an default database. I need a way of retrieving this setting and the
default server as well. Lastly I would like to turn a text box I am currently
using for the DSN name into a dropdown box that contains a list of all
available DSNs. What functions are available to help me poll this list? I'm
really just interested in those DSN's listed under System DSNs in the Data
Source (ODBC).

See the below aeticle for the example I used to model my program thrus far:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcsqlcreatedatasource.asp

Let me know if I was not clear in my explains. Any help would be appreciated.

Bill
.



Relevant Pages

  • Retrieving ODBC Settings.
    ... I'm having some issues grabbing ODBC Settings. ... function to obtain the Server and Database information I need. ... using for the DSN name into a dropdown box that contains a list of all ...
    (microsoft.public.sqlserver.odbc)
  • Re: FormsAuthentication system dsn odbc error
    ... "Michael S." ... > The DSN is on the same machine as the ASP.Net application. ... > The Database the DSN connects to is on a different server. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Refreshing the link on stored procedure
    ... The DSN name and database name stay the same, ... change the server name in the DSN. ... >> But my only little problem is that the stored procedure ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Database problems!
    ... I was trying to create a new database while on the live server... ... did not manually create the connection string... ... Through a DSN? ...
    (microsoft.public.frontpage.client)
  • Writing to a DB versus text file
    ... I am able to write to a text file using ASP without error. ... Both the database and text file are on the same server and in the same ... I've tried using OLEDB and double checked my ODBC settings on the server. ...
    (microsoft.public.data.oledb)