Monday, March 26, 2012

Loop through all dataadapters

Is it possible to loop through all dataadapters on page?

ThanksIf you drop them onto your form at design time then it may be possible to
loop through the controls collection and then work with each control where
the TypeOf var Is System.Data.SQLClient.DataAdapter.
If you create them at runtime then they wouldn't be in the controls
collection. Instead you'd have to add them to a collection of your own and
then loop through that.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net

"Vik" <viktorum@.==yahoo.com==> wrote in message
news:u407bx8SDHA.2196@.TK2MSFTNGP12.phx.gbl...
> Is it possible to loop through all dataadapters on page?
> Thanks
Thanks.

Which controls collection contains the dataadapters added at design time? It
seems the dataadapters are not a part of a page's controls.

Vik

"Steve C. Orr, MCSD" <Steve@.Orr.net> wrote in message
news:ucQNTK9SDHA.1036@.TK2MSFTNGP10.phx.gbl...
> If you drop them onto your form at design time then it may be possible to
> loop through the controls collection and then work with each control where
> the TypeOf var Is System.Data.SQLClient.DataAdapter.
> If you create them at runtime then they wouldn't be in the controls
> collection. Instead you'd have to add them to a collection of your own
and
> then loop through that.
> --
> I hope this helps,
> Steve C. Orr, MCSD
> http://Steve.Orr.net
>
> "Vik" <viktorum@.==yahoo.com==> wrote in message
> news:u407bx8SDHA.2196@.TK2MSFTNGP12.phx.gbl...
> > Is it possible to loop through all dataadapters on page?
> > Thanks

0 comments:

Post a Comment