RE: Allowing user selection of a datasource at run time?
From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 11/19/04
- Next message: Miha Markic [MVP C#]: "Re: Accesing fields in a datareader"
- Previous message: Jordi Vidal: "Re: Accesing fields in a datareader"
- In reply to: Nick Cave: "Allowing user selection of a datasource at run time?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 11:09:07 -0800
Not exactly, but you can build connection strings to connect to any OLEDB
source. With SQL Server, you can use SQL-DMO (via COM Interop) to find all of
the SQL Server instances, which is much easier.
--- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "Nick Cave" wrote: > I am writing a database front end windows application in C#. I need to allow > a user to select a database to connect to at run time via a standard dialog > box. This is easy in Visual C++ 6.0, all you have to do is #include > atldbcli.h and then call the CDataSource class Open() method with no > parameters. This causes the 'Data Link Properties' dialog box to appear > which allows the user to select an OLEDB data provider (Jet, SQL server, > etc), and a database, etc. This data can then be retrieved from the > CDataSource object and used to construct a connection string. > Is there similar functionality provided in the .NET FCL, ie: accessible via > C#? >
- Next message: Miha Markic [MVP C#]: "Re: Accesing fields in a datareader"
- Previous message: Jordi Vidal: "Re: Accesing fields in a datareader"
- In reply to: Nick Cave: "Allowing user selection of a datasource at run time?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading