SqlDataAdapter and DataSet

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?
 
W

William Ryan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top