views:

25

answers:

1

I am trying to make use of DataAdapter, unfortunately stuck with straight ADO.Net, and all of the examples I see have a call like this:

dataAdapter.Fill(dataSet, "TableName");

I want to do a fill in that manner, meaning the data goes into a named table, so that I can properly manage the tables later on in the cycle.

Unfortunately, it appears that that method signature no longer exists, and I am struggling a bit to figure out how to name the table in the DataSet properly. Is there a preferred method for doing this now? Or did MS just scrap this method of interacting with your DataSet?

+1  A: 

How about something like this ?

    DataTable myTable = new DataTable("MyTable");
    adapter.Fill(myTable);
    ds.Tables.Add(myTable);

One more thing, the method signature you mentioned does exist. You can find the method reference here.

decyclone
The link you provided at the bottom was what I was looking for. I was using the wrong interface. That helped get me moving again thanks.
Matt