Good morning Guys,
I've got this code currently running:
private void button1_Click(object sender, EventArgs e)
{
SqlDataSourceEnumerator sdse = SqlDataSourceEnumerator.Instance;
DataTable table = sdse.GetDataSources();
foreach (DataRow row in table.Rows)
{
instanceCombobox.Items.Add(row["ServerName"].ToString() + "\\" + row["InstanceName"].ToString());
}
Which gives me the Instance and Name of the SQL Server over the Network.
I'm now looking to Cycle through available databases on the 'Selected' Instance. Ideally the Databases for the 'Selected' Instance in the 'Top Combo Box' would be in a seperate 'ComboBox.
I checked the Databale through debug but the information is not held there so cannot call it.
Any help would be great.
Regards
Mark.