Posts by gabriel • 1 point
2 posts
-
0
votes2
answers74
viewsA: Foreach repeating values when running sqlquery
Thanks for the tip Dfernandes, I solved using Sqldatareader while(reader.Read()) { pessoaViewModel p1 = new pessoaViewModel(); p1.nome = reader["TbNome"].toString(); }
-
0
votes2
answers74
viewsQ: Foreach repeating values when running sqlquery
While executing my foreach, he is repeating my first result in sql. For example: In doing select * from tbNome he returns Gabriel, Rafael When executing the sqlquery, he list Gabriel, Gabriel…