Re: Standard Database Connection Dialog
Adam Sills <[email protected]> Tue, 30 Oct 2007 11:06:08 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
It's not just you. It's a terrible dialog. But it's "free" though so just making sure it's known. As far as SQLOLEDB or SQLOLEDB.1, if you populate it with a connection ahead of time (it doesn't have to be an open connection, just one with a connection string) you can at least default to the one you want. Adam.. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Brady Kelly Sent: Tuesday, October 30, 2007 10:04 AM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Standard Database Connection Dialog Yes, I used that, and it is ugly - more than just aesthetically; if you use a SqlClient, you have to code around it inserting a Provider value. Maybe I was just too hasty last time, but it seemed like it couldn't decide on whether it wanted SQLOLEDB.1 or SQLOLEDB, so I had to code for both. Maybe I was just in too much of a hurry, > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps > and controls [mailto:[email protected]] On Behalf Of > Adam Sills > Sent: 30 October 2007 04:52 PM > To: [email protected] > Subject: Re: [DOTNET-WINFORMS] Standard Database Connection Dialog > > There's also the horrendously ugly OLEDB connection dialog that you see > when > creating an ODBC data source or when creating a .udl (data link) file. > > http://support.microsoft.com/kb/310083 > > Adam.. > > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps > and > controls [mailto:[email protected]] On Behalf Of R. > Rogers > Sent: Monday, October 29, 2007 4:25 PM > To: [email protected] > Subject: Re: [DOTNET-WINFORMS] Standard Database Connection Dialog > > Wow, > > Thanks for that Peter. > That gives me something to chew on! > > Richard > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps > and > controls [mailto:[email protected]] On Behalf Of > Peter > Ritchie > Sent: October 29, 2007 2:49 PM > To: [email protected] > Subject: Re: [DOTNET-WINFORMS] Standard Database Connection Dialog > > I would suggest using the CredUIPromptForCredentials Win32 function. > It > will present a credential dialog that is consisent to the version of > Windows currently being run. > > There's many examples of using that method, like > http://www.developerfusion.co.uk/show/4693/