G
Guest
connStr="Initial Catalog=EDEMO; Data Source=ELVIS;Integrated Security='sspi'"
conn=new SqlConnection(connStr);
conn.Open();
cmd=new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
-------------------------------
restart the Sql Server (implemented by Process Object, abbreviated here)
-------------------------------
connStr="Initial Catalog=EDEMO; Data Source=ELVIS;Integrated Security='sspi'"
conn=new SqlConnection(connStr);
conn.Open();
cmd=new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
when execute the second statment of "cmd.ExecuteNonQuery();" it will throw
an exception shown as follows:
General network error. Check your network
documentation.System.Data.SqlClient.SqlException: General network error.
Check your network documentation.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WinNTTest.Form1.button11_Click(Object sender, EventArgs e) in
e:\test\c#\winnttest\form1.cs:line 594
conn=new SqlConnection(connStr);
conn.Open();
cmd=new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
-------------------------------
restart the Sql Server (implemented by Process Object, abbreviated here)
-------------------------------
connStr="Initial Catalog=EDEMO; Data Source=ELVIS;Integrated Security='sspi'"
conn=new SqlConnection(connStr);
conn.Open();
cmd=new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
when execute the second statment of "cmd.ExecuteNonQuery();" it will throw
an exception shown as follows:
General network error. Check your network
documentation.System.Data.SqlClient.SqlException: General network error.
Check your network documentation.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WinNTTest.Form1.button11_Click(Object sender, EventArgs e) in
e:\test\c#\winnttest\form1.cs:line 594