Hi
I got a error message once ,I read datareader.The error message is"Invalid attempt to read when no data is present".
Previously I go this error,coz I missed the sqldatareader.Read() method.once I put the datareader.Read method
still I got the same error.
String str_string1="select ID,renew,reminder,heading from dbo.StockModifications";
ContractID_Reader2 = db.getdatareader(str_string1);
ContractID_Reader2.Read();
if (ContractID_Reader2["ID"] != null)
{
}
If there is no records in dbo.StockModifications table then It gives that error message.but is there are data available in
stockmoficaion table there is no error .So I used Contract_Reader.hasrow property also ,but still there is error when there is no data available in datareader
Thanks
Tank50