mysql - DataAdapter Missing Record -


we execute mysql statement data reader (7 records) vb.net load datatable (newly created 6 records?) via code below - first record seem abscond when datatable becomes involved - cannot fathom why - ur wisdom appreciated.

sql = "select count(total) 'inv #', concat(date_format(date, '%m'), '/', date_format(date, '%y')) month, sum(total) 'total' (tblinvoices) group date_format(date, '%m%y') order month desc"                 try                     mycommand.connection = mysqlconn                     mycommand.commandtext = sql                     myadapter.selectcommand = mycommand                     mydata = mycommand.executereader()                     mydata.read()     <- perfect 7 records                 catch ex mysqlexception                     msgbox(ex.number & ", " & ex.message)                                     dim myinvoiced new datatable                     myinvoiced.load(mydata) <- 6 records??? 

try without line.

mydata.read() 

it positioning @ second record.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -