SELECT [name] FROM master.dbo.sysdatabases WHERE dbid > 4
... using Microsoft.SqlServer.Management.Smo; ... Server sr = new Server("MACHINE_NAME\\INSTANCE_NAME"); try { DbCombo.Items.Clear(); foreach (Database db in sr.Databases) { DbCombo.Items.Add(db.Name); } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)