SqlDataAdapter and DataSet

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

When you call Fill method passing a DataSet object and table name, is that
table name associated with the SQL Server table name or just the moniker
that will be attached to the generated table inside thee DataSet's
TableCollection? What if you call Fill() without passing a table name, does
SqlDataAdapter generate some name?
 
Say I have SELECT * FROM Bills_Table

Then I fire da.Fill(BillsDataSet, "Not_Bills_Table")

BillsDataSet.Tables(0) will be named "Not_Bills_Table"

On the other hand, I could do this....
Dim dTest2 as New DataTable
da.Fill(dTest2)

It will be named dTest2.

If you don't specify a name, reference it by DataSet.Tables
(Index).

Hope this helps.

Bill
 
Back
Top