SQL Server dialog instead of pre-defined connection string

Posts   
 
    
Jeroen
User
Posts: 5
Joined: 18-Aug-2003
# Posted on: 14-Jun-2006 11:38:23   

I want to give the users of my desktop app the flexibility to switch between database servers: sometimes they want to use the local engine, for other stuff they might want to use some server on the network.

Now instead of having them change the ConnectionString-property in the .config file(s), is there a way to just get that typical (SQL Server?) dialog that lets you pick an instance and enter credentials?

Thanks for any help!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 14-Jun-2006 11:55:32   

I believe that dialog is part of the OleDB provider for SQLServer (which thus will give you a wrong connection string: you've to chop off the PROVIDER=SQLOLEDB; at the beginning)

You can call that dialog whenever you want and then use the connectionstring with the DataAccessAdapter instance you're going to use for data-access. Multiple DBs in selfservicing are only supported if it's a desktop app and thus single user, as the connection string is global in selfservicing.

Frans Bouma | Lead developer LLBLGen Pro
Jeroen
User
Posts: 5
Joined: 18-Aug-2003
# Posted on: 14-Jun-2006 12:29:50   

Excellent, thanks!