mysql - vb.net adding large sum on variable integer -
i created queuing system display multiple counters , queue number of customer , service group when update them, data looks first counter. update function refreshed on timer tick every 1 second updates information.
public sub updatecountera() openconnect() sqli = "select `counter`, `logconcern`, `logcustcurr` `access` logstatus= 1 , counter=1 " sqlrun() if mydata.rows.count = 0 countera.text = "avail" counteracust.text = "avail" counteraservice.text = "avail" else countera.text = mydata.rows(0)(0) counteracust.text = mydata.rows(0)(1) counteraservice.text = mydata.rows(0)(2) end if closeconnect() end sub public sub updatecounterb() openconnect() sqli = "select `logconcern`, `logcustcurr` `access` logstatus= 1 , counter=2 " sqlrun() if mydata1.rows.count = 0 counterb.text = "avail" counterbcust.text = "avail" counterbservice.text = "avail" else counterb.text = mydata1.rows(0)(0) counterbcust.text = mydata1.rows(0)(1) counterbservice.text = mydata1.rows(0)(2) end if closeconnect() end sub
every timer tick information of countera shows on counter (counterb, counterc). when try include mydata.clear()
, shows error of "no data row position". how can counters update information without compressing info in 1 sql statement , selecting per data row since messy that?
edited add sqlrun() method
yes missing 'counter' added on counterb still shows identical information here sqlrun ():
public sub sqlrun() 'transfer sql connections sql = sqli mycommand.connection = conn mycommand.commandtext = sql 'execute adapter commands myadapter.selectcommand = mycommand myadapter.fill(mydata) myadapter.fill(mydata1) myadapter.fill(mydata2) end sub
Comments
Post a Comment