I am using Visual Studio 2008; I am executing one query and its results are coming in the datareader dr1; I have checked this in debug window. Even though values are coming inside datareader it's read property dr1.read() is coming false. How is this happening. How do i remove this bug
The resulting values of query comes in dr1. in debugger under the haeding Result View-> [0]-> Non-public members-> _values. And still dr1.read() is coming false.People plz reply. This is urgent.
query1="select username,date,subject,description from doubts where heading='" + strheading + "'"
con.Open();
SqlCommand cmd1= new SqlCommand(query1,con);
SqlDataReader dr1;
dr1=cmd1.ExecuteReader();
I just changed the sequence of username, date into date,username and now the code is working. I still don't know the exact reason why this happened. Is it because in database i have difined date before username?