DbDataReader stops reading after a while [closed]

1

When the database is in the beginning, it works perfectly, after some time of use, the object does not return anything and the query does not work.

This is the source:

using (DbCommand cmd = CreateCommand(conn, sql.ToString()))
{
    List<TagPojo> tags = new List<TagPojo>();
    AddParameter(cmd, "@tag", DadoTagPojo.Tag);
    AddParameter(cmd, "@dtIni", FData(formataData));
    AddParameter(cmd, "@dtFim", FData(formataData2));


    using (DbDataReader dr = cmd.ExecuteReader())
    {

        while (dr.Read())
        {
            TagPojo tag = new TagPojo();
            ExtrairDados(dr, tag);
            tags.Add(tag);
        }

        return tags;
    }
}
    
asked by anonymous 22.09.2015 / 21:58

0 answers