vb.net - MySQL data in listview gets looped (?) -


i have listview went wrong today, data inside looped endlessly. what's wrong?

  public sub list1()     sqls = "select * petugas"     using cmd new odbc.odbccommand(sqls, conn)         dr = cmd.executereader         while dr.read             listpetugas                 .items.add(dr("kd_petugas")).tostring()                 .items(.items.count - 1).subitems                     .add(dr("nm_petugas").tostring())                     .add(dr("j_kel_petugas").tostring())                     .add(dr("almt_petugas").tostring())                     .add(dr("tlp_petugas").tostring())                 end             end         end while     end using end sub 

why dumping dr listpetugas?

what context listpetugas?

please show event calling sub.

you should use dt instead if holding data in object.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -