Out of Memory when reading a string from SqlDataReader

前端 未结 3 717
攒了一身酷
攒了一身酷 2020-12-30 05:21

I\'m running into the strangest thing that I can\'t figure out. I have a SQL table with a bunch of reports stored in an ntext field. When I copied and pasted the value of on

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 05:41

    wild guess here.

    cmd.Parameters.Add(new SqlParameter("CompiledReportTimeID", CompiledReportTimeID));
    

    you missed the @ sign. so it replaces both instances of CompiledReportTimeID with the id and you get all the results instead because of the equality?

提交回复
热议问题