.net datatable skips rows load(datareader)


i'm perplexing stock datatable, build localreport, controlling following:



mysqlcommand cmd = new mysqlcommand();
cmd.connection = new mysqlconnection(properties.settings.default.dbconnectionstring);
cmd.commandtype = commandtype.text;
cmd.commandtext = "select ... left join ... where ..."; /* query snipped */

// prepared data
datatable.clear();
cn.open();
// fill datatable
dt.load(cmd.executereader());
// fill report
rds = new reportdatasource("invoicesdataset_invoicetable",dt);
reportviewerlocal.localreport.datasources.clear();
reportviewerlocal.localreport.datasources.add(rds);


at indicate i beheld news deficient blank record. i've altered few conditions query relapse accurately twin rows and... surprise: news shows wholly quarrel instead two. i've attempted debug where problem i got stranded at



 dt.load(cmd.executereader());


when i've beheld datareader contains twin annals nonetheless datatable contains wholly one. accident, i've total an order by apportionment query beheld news showed correctly.


apparently, datareader contains twin rows nonetheless datatable wholly reads both sql query twine contains an order by (otherwise wholly reads final one). anyone explain since duty fixed?



edit:
when i initial posted question, i conspicuous skipping initial row; after i satisfied indeed wholly review final quarrel i've edited calm accordingly (at annals grouped twin rows seemed skip initial indeed wholly showed last). competence caused fact didn't have unparalleled identifier heed between rows returned mysql adding order by matter caused emanate unparalleled identifier any row.

this only speculation i have zero support it, nonetheless tests seem lead same result.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?