Advertisement
vim_fans

Untitled

Sep 14th, 2021
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. while (rt.HasRows)
  2. {
  3. while (rt.Read())
  4. {
  5. ProjectInfo model = new ProjectInfo();
  6. if (!rt.IsDBNull(0))
  7. {
  8.  
  9. model.XMXX_DWMC = rt.GetString(0);
  10. }
  11.  
  12.  
  13. entities.Add(model);
  14.  
  15. /**If I comment on this statement, the program would be infinitely run. But If I did not comment on it,
  16. rt seems like not to read the next row. I am certanly sure there are lots of rows in datareader.But I only get
  17. the first row .
  18. **/
  19. rt.NextResult();
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement