using(SqlConnection conn = new SqlConnection(strConn))
{
string strSQL = "select * from users";
SqlCommand cmd = new SqlCommand(strSQL, conn);
cmd.CommandTimeout = 0;
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
....
}
reader.Close();
}
沒有留言:
張貼留言