IRetrievalQuery query = new RetrievalQuery(commandToUse);
IDataReader reader = null;
try
{
reader = dao.GetAsDataReader(null, query, CommandBehavior.Default);
while (reader.Read())
{
Response.Write(string.Format("Amount:{0},CategoryId:{1},Name:{2}", info.Amount, info.CategoryId, info.Name));
}
//reader.Close();
}
catch (Exception exc)
{
throw exc;
}
finally
{
if (reader != null)
reader.Close();
}
query as follow:
{
Query: call Expenses(@actionTypeId,@isSchedule,@userId,@dateStart,@dateEnd)
Parameter: actionTypeId : AnsiString. Length: 1. Precision: 0. Scale: 0. Direction: Input. Value: "1".
Parameter: isSchedule : AnsiString. Length: 1. Precision: 0. Scale: 0. Direction: Input. Value: "0".
Parameter: userId : Int32. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 1.
Parameter: dateStart : AnsiString. Length: 10. Precision: 0. Scale: 0. Direction: Input. Value: "2010-01-01".
Parameter: dateEnd : AnsiString. Length: 10. Precision: 0. Scale: 0. Direction: Input. Value: "2010-05-11".
}
the DB is MySQL 5.0
the result should have 5 rows.
current problem is : dao.GetAsDataReader return nothing.
please advise.
Thank you.