Home All Groups Group Topic Archive Search About

SqlDataSource: how to access internal data via code

Author
16 Feb 2006 2:10 PM
Glenn Maples
Guys- I hope this is a quck question but I've been playing with this for
several hours and getting no love.  Thanks!!!

Assume I have a SqlDataSource after databind -- that is populated with data.
Is there any accessor to the internal state?

I presume that the state is in a DataSet or some other internal structure
and that probably this is encapsulated to facilitate archtectual changes. 
But I need to access the data, change it a bit, and use it to populate a
couple of other SQLDataStores?

Any ideas?

Thanks

-glenn

Author
18 Feb 2006 9:48 PM
Otis Mukinfus
On Thu, 16 Feb 2006 06:10:27 -0800, Glenn Maples <Glenn
Map***@discussions.microsoft.com> wrote:

Show quote
>Guys- I hope this is a quck question but I've been playing with this for
>several hours and getting no love.  Thanks!!!
>
>Assume I have a SqlDataSource after databind -- that is populated with data.
> Is there any accessor to the internal state?
>
>I presume that the state is in a DataSet or some other internal structure
>and that probably this is encapsulated to facilitate archtectual changes. 
>But I need to access the data, change it a bit, and use it to populate a
>couple of other SQLDataStores?
>
>Any ideas?
>
>Thanks
>
>-glenn
When you created your DataSource the wizard will have created a Strong
Typed DataSet for you.  You can use the objects in that DataSet to
access the data.

Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Author
19 Feb 2006 8:25 PM
Glenn Maples
Otis,

Thanks for the help, but I think the problem is my understanding fof the
datasource control. 

I was thinking that the datasource acted as both a "connection" and as a
"store" of data.  I am pretty sure that this is not the case--that the
datasource serves purely for a connection/transfer mechanism and that the
data has to go into another container (dataset, gridview, something) in 
order to be accessed.

My question was about accessing the store INSIDE the SqlDataSource--I think
that the correct answer is "Dummy, the DataSource does not store data
internally"
..
Please correct me if I'm wrong.

Thanks again,

-glenn

Show quote
"Otis Mukinfus" wrote:

> On Thu, 16 Feb 2006 06:10:27 -0800, Glenn Maples <Glenn
> Map***@discussions.microsoft.com> wrote:
>
> >Guys- I hope this is a quck question but I've been playing with this for
> >several hours and getting no love.  Thanks!!!
> >
> >Assume I have a SqlDataSource after databind -- that is populated with data.
> > Is there any accessor to the internal state?
> >
> >I presume that the state is in a DataSet or some other internal structure
> >and that probably this is encapsulated to facilitate archtectual changes. 
> >But I need to access the data, change it a bit, and use it to populate a
> >couple of other SQLDataStores?
> >
> >Any ideas?
> >
> >Thanks
> >
> >-glenn
> When you created your DataSource the wizard will have created a Strong
> Typed DataSet for you.  You can use the objects in that DataSet to
> access the data.
>
> Otis Mukinfus
> http://www.otismukinfus.com
> http://www.tomchilders.com
>

AddThis Social Bookmark Button