G
Guest
Hi
i am selecting a table from a db and assign it via DataAdapter to a DataTable.
I now want to do an action for each ro in the DataTable, for what i choose
foreach to accomplish that. My Problem ist now, that the row count shows me
that there are 5 rows in the DataTable, same as in db, but the action is done
only 4 times. The last row in the DataTable seems to be ignored.
Here the place in the code is use:
//Create Data-Table
DataTable dt = new DataTable();
MySqlDataAdapter da = new MySqlDataAdapter("SELECT * FROM qmgrs", conn );
MySqlCommandBuilder cb = new MySqlCommandBuilder(da);
//Fill Table with QueueManager data
da.Fill(dt);
foreach (DataRow dr in dt.Rows){
try {
Are there any ideas for this problem??
Thanks, Thorsten
i am selecting a table from a db and assign it via DataAdapter to a DataTable.
I now want to do an action for each ro in the DataTable, for what i choose
foreach to accomplish that. My Problem ist now, that the row count shows me
that there are 5 rows in the DataTable, same as in db, but the action is done
only 4 times. The last row in the DataTable seems to be ignored.
Here the place in the code is use:
//Create Data-Table
DataTable dt = new DataTable();
MySqlDataAdapter da = new MySqlDataAdapter("SELECT * FROM qmgrs", conn );
MySqlCommandBuilder cb = new MySqlCommandBuilder(da);
//Fill Table with QueueManager data
da.Fill(dt);
foreach (DataRow dr in dt.Rows){
try {
Are there any ideas for this problem??
Thanks, Thorsten