getting table from currencymanger

  • Thread starter Thread starter astro
  • Start date Start date
A

astro

Is there a way I can get the table for which a given currencymanager is
pointed to?

I am thinking of a routine that take a currencymanager as an arguement,
figures out which table it represents and issues an update for the
appropriate data adapter.

Thanks
 
Hi,

astro said:
Is there a way I can get the table for which a given currencymanager is
pointed to?

Even when you bind to a DataTable or DataSet internally a DataView is used
by the CurrencyManager, so to get the Table, you first get the view :

Public Function GetTable(ByVal cm As CurrencyManager) As DataTable

Dim view As DataView = DirectCast(cm.List, DataView)
Return view.Table

End Function

Hth,
Greetings
 
thanks - that works )

is there a way to get the dataAdapter from the the currencyManager?

otherwise I code the 'select case.........'
 
Hi,

astro said:
thanks - that works )

is there a way to get the dataAdapter from the the currencyManager?

No, a DataAdapter is not associated with a CurrencyManager.

A Select...Case would do it, an alternative is to use a Hashtable for
associating each DataTable with a CurrencyManager.

Hth,
Greetings
 

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

Back
Top