Problem with DataTable
-
I am using MySQLDriverCS and I have a table I have gotten through the select command. When I try the following
foreach(DataRow myData in MyDataTable.Rows) { }
I throws an InvalidCastException in System.Data.dll I have even tried sending the rows to a DataRowCollection and it does the same thing when doing the foreach loop. I have checked HasErrors property and it is false. This is not making much sence to me. Anyone have any ideas. -
I am using MySQLDriverCS and I have a table I have gotten through the select command. When I try the following
foreach(DataRow myData in MyDataTable.Rows) { }
I throws an InvalidCastException in System.Data.dll I have even tried sending the rows to a DataRowCollection and it does the same thing when doing the foreach loop. I have checked HasErrors property and it is false. This is not making much sence to me. Anyone have any ideas.What about this?
for(int i=0; i<MyDataTable.Rows.Count; i++)
{
MyDataTable.Rows[i]. ...
}
Don't forget, that's
Persian Gulf
not Arabian gulf!
Murphy:
Click Here![^]
Events and Delegates simplified:
Click Here![^]
I'm thirsty like sun, more landless than wind...