RE: Allowing user selection of a datasource at run time?

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 11/19/04


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#?
> 


Relevant Pages

  • Re: oledbconnection v sqlconnection
    ... The OleDb provider is a one-size-fits-all data access interface that uses ... No two database engines have the same SQL so you'll have to ... actual low-level data access layer and exposes a common object layer that ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Express 2005 doesnt support multiple users....
    ... > database should specify the same connection. ... With user instances, you are ... > Express) and set both client connection strings to ... > Jasper Smith (SQL Server MVP) ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL Express 2005 doesnt support multiple users....
    ... > database should specify the same connection. ... With user instances, you are ... > Express) and set both client connection strings to ... > Jasper Smith (SQL Server MVP) ...
    (microsoft.public.sqlserver.connect)
  • RE: How do I enable the web server to create a database?
    ... Although I have still had no success creating the database, ... I tried some new connection strings in web.config. ... also be caused by the role manager feature not being enabled. ... tried using SQL Server Authentication is a member of every role in the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: msde2000
    ... MSDE is the desktop version of SQL server. ... Basically, Access is a desktop application, MSDE is a database backend. ... go through OLEDB, so theoretically therefore it's arguably the fastest ...
    (microsoft.public.vc.language)

Loading