For getting the data in the data reader, I am using the following statements in C#:

AisCommand cmd = newAisCommand())
cmd.CommandType =
cmd.CommandText = spName;
cmd.Connection = conn;
AisParameter p1 = newAisParameter();
p1.Value = sortKey +

objReader = cmd.ExecuteReader();

I am getting results in the objReader, the problem is whenever checking for property "objReader.HasRows" of AisDataReader, it always returns false.

"objReader.HasRows" always returns false whether the data is being returned or not.

Is there some setting or extra step is to be done at the code level to get the correct value in the "HasRows" property of AisDataReader.