SqlConnection myConn = new SqlConnection();
myConn.ConnectionString = "Data Source =localhost\\SQLEXPRESS;";
myConn.ConnectionString = "Initial Catalog=aa;";
myConn.ConnectionString = "Integrated Security=True;";
SqlCommand myCmd = new SqlCommand();
myCmd.CommandText = "INSERT INTO [ab](b)VALUES (3)";
myCmd.Connection = myConn;
myConn.Open();
myCmd.ExecuteNonQuery();
myConn.Close();
هل الاتصال والاستعلام السابق صحيح ؟؟
بعد الرن يحدد على جملة فتح الاتصال
مع الاكسبشن التالي
An error has occurred while establishing a connection to the server ,
When connecting to sql server ,this failure may be caused by the fact that under default settings sql server does not allow remote connections.
مالحل وما السبب ؟؟
أريد اجابة شافيـــــــــــــــــــــــــــــــــــــــــــــــــــــــــه