After i finished installing sqlserve, i couldn't add a database to my project. It gives me the following error:

could any one help me pleeeaase, i'm so tired of that.
Thanx
This post has been edited by Bent al-Yemen: 23 April 2010 - 06:46 AM




Posted 23 April 2010 - 06:43 AM

This post has been edited by Bent al-Yemen: 23 April 2010 - 06:46 AM
Posted 23 April 2010 - 07:49 AM
Posted 23 April 2010 - 08:18 AM
Posted 23 April 2010 - 09:28 AM

Posted 23 April 2010 - 10:27 AM



Posted 23 April 2010 - 11:02 AM
Posted 23 April 2010 - 11:06 AM
Posted 23 April 2010 - 11:25 AM

string connectionString = "Data Source=localhost; Initial Catalog=Northwind;" +
"Integrated Security=SSPI";
SqlConnection con = new SqlConnection(connectionString);
try
{
// Try to open the connection.
con.Open();
lblInfo.Text = "<b>Server Version:</b> " + con.ServerVersion;
lblInfo.Text += "<br /><b>Connection Is:</b> " + con.State.ToString();
}
catch (Exception err)
{
// Handle an error by displaying the information.
lblInfo.Text = "Error reading the database. " + err.Message;
}
finally
{
// Either way, make sure the connection is properly closed.
// Even if the connection wasn't opened successfully,
// calling Close() won't cause an error.
con.Close();
lblInfo.Text += "<br /><b>Now Connection Is:</b> " +
con.State.ToString();
}
Posted 23 April 2010 - 11:32 AM
Posted 24 April 2010 - 10:04 AM
Posted 25 April 2010 - 04:24 AM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
