I sometimes get two different of error when executing OdbcDataAdapter.Fill(DataTable). Here is the code example:
string odbc = "select item, upcno from table";
OdbcCommand cmd = new OdbcCommand(odbc, fconn);
OdbcDataAdapter oda = new OdbcDataAdapter(cmd);
oda.Fill(dt);
System.NullReferenceException: Object reference not set to an instance of an object.
System.InvalidOperationException: No data exists for the row/column.
Does anyone have clue to resolve this problem?