Re: PromptDataSource method



Add a reference to Microsoft.Data.ConnectionUI. This is located in the
directory where VS is installed, eg:

C:\Program Files\VS8\Common7\IDE\Microsoft.Data.ConnectionUI.dll

Add the following code...

using Microsoft.Data.ConnectionUI;

....

Microsoft.Data.ConnectionUI.DataConnectionDialog dcd = new
Microsoft.Data.ConnectionUI.DataConnectionDialog();

Microsoft.Data.ConnectionUI.DataSource.AddStandardDataSources(dcd);

if (Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(dcd)
== System.Windows.Forms.DialogResult.OK)
{
string buf = "Provider: " + dcd.SelectedDataProvider.Name +
"\r\n" + "ConnectionString: " + dcd.ConnectionString;
}

This is an undocumented method of displaying the same dialog that
VS.NET uses. But what the hack (I mean what the 'heck'). Some features
eventually find their way into a product when enough users use the hack
and Microsoft eventually catches on. This feature really should have
been in the product from day one. You listening MS?

Best Regards
Polaris431

.



Relevant Pages

  • Re: .Net COM+
    ... write your own IUnknown to expose a programmatic interface to ... management leaves a lot to be desired (Reference counts isn't perfect, ... transaction features can be used .. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: MS Data Access Block
    ... features, I meant in my program that uses the block, not that I made changes ... in project 'Forms1' cannot be copied to the run directory because it would ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: qsort and arbitrary types
    ... the exceptions are becoming less ... Some new features are pretty much impossible to ... >>implement with pass by reference. ... The Fortran rules were designed to allow the compiler to ...
    (comp.lang.fortran)
  • Re: qsort and arbitrary types
    ... >> With newer features and compilers, the exceptions are becoming less ... Some new features are pretty much impossible to ... >> implement with pass by reference. ...
    (comp.lang.fortran)
  • Re: Pass by reference or by value?
    ... I previously created a topic named "Pass by reference or by value" where I ... sets the local variable "param" (be that of imaginary type int* or int, ... That hack makes sure that a method of the passed object is ... GPG key: 0xF421434B may be found on various keyservers, ...
    (comp.lang.python)