Accessing data adapter in a dataset

J

John

Hi

I am trying to access the data adapter for a table in a dataset as below;

MyDataSet.MyTable.Clear()
MyDataSet.MyTableTableAdapter.Fill(MyDataSet.MyTable)

But I am getting a 'MyDataSet.MyTableTableAdapter' is not a member of
'MyDataSet'. What is the problem and how can I access the underlying data
adapter for the table MyTable?

Thanks

Regards
 
S

Shawn Wildermuth

The Typed DataSet doesn't have the Table Adapter. You'll need to create
an instance of it to call Fill. These are usually in their own namespace
(Something like MyProject.MyDataSet.TableAdapters).

Thanks,

Shawn Wildermuth
Microsoft MVP (C#)
http://wildermuthconsulting.com
mailto:swildermuth@REMOVE_ALLCAPS_adoguy.com
 
C

Cor Ligthert[MVP]

John,

Will you try it like this?

\\\
MyDataSet.MyTable.Clear()
dim da as New MyTableTableAdapter
da.Fill(MyDataSet.MyTable)
///

Cor
 

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