static string connection = @"server=.;database=Meadin;user id=sa;password=sa";
SqlConnection conn;
SqlDataReader reader;
using (conn = new SqlConnection(connection))
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "select * from document";
conn.Open();
reader = cmd.ExecuteReader();
conn.Close();
}
}