Hi,
In the init event of my forms I am dynamically setting up the connection string as shown below.
Dim cClient As New cClient
cClient = clTools.GetClientDetails(iCl_Id, 0)
Dim sConn As New SqlConnectionStringBuilder()
With sConn
.DataSource = cClient.Em_Db_Host
.InitialCatalog = cClient.Em_Db_Name
.UserID = cClient.Em_Db_User
.Password = cClient.Em_Db_Key
.ConnectTimeout = 45
.IntegratedSecurity = False
End With
ds.ConnectionString = sConn.ToString
This works fine but if I add a datasource and forget to add it to my code I will run into trouble.
Therefore I want to do something like written in the pseudocode shown below
idx=0
For each datasources
ds(idx).ConnectionString = sConn.ToString
idx +=1
Next
... but I don't find how to get a list of all System.Web.UI.WebControls.SqlDataSource found on the underlying form.
Any idea ?