0
using (SqlConnection con = new SqlConnection ("ConnectionString"))
{
con.Open();
..........
}
而不是上面的例子,我使用下面的代碼。使用靜態連接會導致內存問題嗎?(Asp.NET MVC)使用靜態連接?
public static class
{
static SqlConnection con;
static string connectionString = "......";
public static method
{
con = SqlConnection(connectionString);
con.Open();
}
}
謝謝...