string connString = "Data Source=(local);Initial Catalog=Db;Integrated Security=SSPI;";
using (SqlConnection conn = new SqlConnection(connString))
{
conn.Open();
string sql = @"select top 1 * from tbl order by id desc";
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{
_info.Text = reader["title"].ToString();
}
reader.Close();
}
}
conn.Close();
}