Using the Windows/.Net Datasource Configuration Wizard [Control]
-
Hi guys, I am writing a small VB.Net 2005 program that should connect to different databases at run time. I would like to include the windows/.net datasource configuration wizard in the system and get the connection string from the wizard control but I cant find control or way to achieve the goal, is it possible or maybe is there a workaround? Thanks for you assistance.:confused::confused::confused:
-
Hi guys, I am writing a small VB.Net 2005 program that should connect to different databases at run time. I would like to include the windows/.net datasource configuration wizard in the system and get the connection string from the wizard control but I cant find control or way to achieve the goal, is it possible or maybe is there a workaround? Thanks for you assistance.:confused::confused::confused:
Got the answer to my question Add references of 2 assemblies, Microsoft.Data.ConnectionUI.dll and Microsoft.Data.ConnectionUI.Dialog.dll, located at C:\Program Files\Microsoft Visual Studio 8\Common7\IDE which by the way are not redistributable, then in code you have something like this...
Imports Microsoft.Data.ConnectionUI ... ... Dim myDataConnectionDialog As New DataConnectionDialog DataSource.AddStandardDataSources(myDataConnectionDialog) If DataConnectionDialog.Show(myDataConnectionDialog) = Windows.Forms.DialogResult.OK Then txtSourceConnection.Text = myDataConnectionDialog.ConnectionString End If
Thanks to all who cared to think about it:-D:-D:-D:-D:-D:-D:-D:-D:-D -- modified at 3:00 Thursday 6th September, 2007 -
Hi guys, I am writing a small VB.Net 2005 program that should connect to different databases at run time. I would like to include the windows/.net datasource configuration wizard in the system and get the connection string from the wizard control but I cant find control or way to achieve the goal, is it possible or maybe is there a workaround? Thanks for you assistance.:confused::confused::confused:
That is good information to know! I have hear of people distributing connection strings by reading it from text file, XML file, INI file or a DSN file (.udl). I have to try your way. Thanks for the update. :)
Pete Soheil DigiOz Multimedia http://www.digioz.com