Object reference not set to an instance of an object
Form2 fr2 = new Form2(); string srv = fr2.sqlServerComboBox.SelectedItem.ToString(); string pass = fr2.passwordTextBox.Text.ToString(); string database = fr2.databaseComboBox.SelectedItem.ToString(); string str = @"Data Source=srv;" + "Initial Catalog=database;" + "Persist Security Info=True;" + "User ID=sa;" + "Password=pass";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)