The srcTable
parameter is the name of the DataTable
in DataSet
object.
EDIT:
The DataSet
object automatically adds a table when you call Fill
if you have not explicitly created one. The Default name is "Table". I do not believe the DataSet
object cares about what type of data it is being filled with. It still creates the DataTable
.
Before you call Fill()
on your DataAdapter
. Add an empty table to the DataSet
with a name so you are able to access it during the Fill()
method:
ds.Tables.Add("myTableName");
Then call the proper overloaded Fill()
method like so:
da.Fill(ds, 1, 1000, "myTableName");
Or if you just use the default name of the table, or are unsure of the name of the table you created (doubtful):
da.Fill(ds, 1, 1000, ds.Tables[0].TableName);
Spcifically using your example it should look like this:
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
ds.Tables.Add();
da.Fill(ds, 1, maxRowCount, ds.Tables[0].TableName);//Here is where I need to limit the rows