Sir,
working with c#,
I am reading the data from database using SqlDataReader, but it's give me an error regarding syntax error [System.Data.SqlClient.SqlException: Incorrect syntax near '='.] the following error on SqlDataReader dr = cmd.ExecuteReader();.
public void fillnews()
{
SqlConnection con = new SqlConnection(constr());
SqlCommand cmd = new SqlCommand();
cmd = new SqlCommand("select * from latestupdates id=" + Request.QueryString["lid"], con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if(dr.HasRows)
{
while (dr.Read())
{
tdetails.Text = dr["details1"].ToString();
}
}
}