private void LoadDatabaseObjects() { try { tError.Text = ""; cbObjects.Items.Clear(); using (DataStuff sn = new DataStuff()) { DataTable dt = sn.GetDatabaseObjects(ConnectionString, cbDatabaseName.Text, ObjectsSelected); if (dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { cbObjects.Items.Add(row["Name"].ToString()); } } } } catch (Exception ex) { tError.Text = ex.Message; } }