Dear all
I got that error when I was trying to connect to a server over IP
Object reference not set to an instance of an object.
the code for that
string
connectionstr = string.Format(@"Data Source=10.192.4.154,1433;Initial
Catalog=maindatabase;Integrated Security=True",
listBox1.SelectedItem.ToString());
SqlConnection connection = new SqlConnection();
connection.ConnectionString = connectionstr;
connection.Open();
statusStrip1.Items.Add("Connection Is Open");
connection.Close();
Any Ideas?
little83