By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,592 Members | 975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,592 IT Pros & Developers. It's quick & easy.

getting table from currencymanger

P: n/a

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
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
Astro,

Probably using this.

http://msdn.microsoft.com/library/de...dingstopic.asp

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Hi,

"astro" <as***@mnrr.com> wrote in message
news:ZR****************@tornado.rdc-kc.rr.com...

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


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

Nov 21 '05 #3

P: n/a
thanks - that works )

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

otherwise I code the 'select case.........'
"Bart Mermuys" <bm*************@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
Hi,

"astro" <as***@mnrr.com> wrote in message
news:ZR****************@tornado.rdc-kc.rr.com...

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


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


Nov 21 '05 #4

P: n/a
Hi,

"astro" <as***@mnrr.com> wrote in message
news:F%**************@tornado.rdc-kc.rr.com...
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

otherwise I code the 'select case.........'
"Bart Mermuys" <bm*************@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
Hi,

"astro" <as***@mnrr.com> wrote in message
news:ZR****************@tornado.rdc-kc.rr.com...

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


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




Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.