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

Storing a datatable in application or session state?

P: n/a
Is it possible to store an entire datatable/dataset in session state? If
so, could someone please provide a code snippet or a link to documentation
for me please? (I'm having no luck at all)

Thanks very much in advance,

Jason
Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
A DataSet can hold an entire database, and you can stick a whole DataSet
into session state if you choose.
Be careful though, this can eat a lot of server memory if you have very many
users.

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

"Jason" <ja***@grossmans.net> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
Is it possible to store an entire datatable/dataset in session state? If
so, could someone please provide a code snippet or a link to documentation
for me please? (I'm having no luck at all)

Thanks very much in advance,

Jason

Nov 18 '05 #2

P: n/a
Actually, I said session state but meant viewstate. If I use viewstate,
would I have to serialize then deserialize the dataset? Could I use
viewstate the same way as session state basically? I'm having much more
luck with session state rather than viewstate which is why I'm asking,
perhaps I'm missing a fundamental understanding of the difference between
viewstate and session state. I thought simply that one is for server and
one is client side...
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
A DataSet can hold an entire database, and you can stick a whole DataSet
into session state if you choose.
Be careful though, this can eat a lot of server memory if you have very many users.

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

"Jason" <ja***@grossmans.net> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
Is it possible to store an entire datatable/dataset in session state? If so, could someone please provide a code snippet or a link to documentation for me please? (I'm having no luck at all)

Thanks very much in advance,

Jason


Nov 18 '05 #3

P: n/a
You should be able to use ViewState the same way.
DataSets are serializable by default.

ViewState("MyDataSet") = MyDataSet

This will add significant size to your page of course.

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

"Jason" <ja***@grossmans.net> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
Actually, I said session state but meant viewstate. If I use viewstate,
would I have to serialize then deserialize the dataset? Could I use
viewstate the same way as session state basically? I'm having much more
luck with session state rather than viewstate which is why I'm asking,
perhaps I'm missing a fundamental understanding of the difference between
viewstate and session state. I thought simply that one is for server and
one is client side...
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
A DataSet can hold an entire database, and you can stick a whole DataSet
into session state if you choose.
Be careful though, this can eat a lot of server memory if you have very

many
users.

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

"Jason" <ja***@grossmans.net> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
> Is it possible to store an entire datatable/dataset in session state? If > so, could someone please provide a code snippet or a link to documentation > for me please? (I'm having no luck at all)
>
> Thanks very much in advance,
>
> Jason
>
>



Nov 18 '05 #4

P: n/a
just lurking this thread. I do this frequently and was wondering if it is
possible to get any reporting on the size of all of the session state
objects on a web server.
TIA,
T
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
You should be able to use ViewState the same way.
DataSets are serializable by default.

ViewState("MyDataSet") = MyDataSet

This will add significant size to your page of course.

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

"Jason" <ja***@grossmans.net> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
Actually, I said session state but meant viewstate. If I use viewstate,
would I have to serialize then deserialize the dataset? Could I use
viewstate the same way as session state basically? I'm having much more
luck with session state rather than viewstate which is why I'm asking,
perhaps I'm missing a fundamental understanding of the difference between
viewstate and session state. I thought simply that one is for server and
one is client side...
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
A DataSet can hold an entire database, and you can stick a whole DataSet
into session state if you choose.
Be careful though, this can eat a lot of server memory if you have very

many
users.

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

"Jason" <ja***@grossmans.net> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
> Is it possible to store an entire datatable/dataset in session state?

If
> so, could someone please provide a code snippet or a link to

documentation
> for me please? (I'm having no luck at all)
>
> Thanks very much in advance,
>
> Jason
>
>



Nov 18 '05 #5

P: n/a
You can get a rough idea by watching the free RAM in the windows performance
monitor during various tests.
If you want to get more formal you can also interact with these metrics from
code at runtime.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Tina" <ti**********@removespamexcite.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
just lurking this thread. I do this frequently and was wondering if it is
possible to get any reporting on the size of all of the session state
objects on a web server.
TIA,
T
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
You should be able to use ViewState the same way.
DataSets are serializable by default.

ViewState("MyDataSet") = MyDataSet

This will add significant size to your page of course.

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

"Jason" <ja***@grossmans.net> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
Actually, I said session state but meant viewstate. If I use viewstate,
would I have to serialize then deserialize the dataset? Could I use
viewstate the same way as session state basically? I'm having much more
luck with session state rather than viewstate which is why I'm asking,
perhaps I'm missing a fundamental understanding of the difference
between
viewstate and session state. I thought simply that one is for server
and
one is client side...
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
A DataSet can hold an entire database, and you can stick a whole
DataSet
into session state if you choose.
Be careful though, this can eat a lot of server memory if you have very
many
users.

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

"Jason" <ja***@grossmans.net> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
> Is it possible to store an entire datatable/dataset in session state?
If
> so, could someone please provide a code snippet or a link to
documentation
> for me please? (I'm having no luck at all)
>
> Thanks very much in advance,
>
> Jason
>
>



Nov 18 '05 #6

P: n/a
is it possible to pass the session between asp.net applications located on 2 different servers? I have a page that collects data and populates a very tiny table. Then I want to pass that table to another application and be able to read the data in the fields. Is there a way to do it? I tried, but get an empty object or session - says: Object reference not set to an instance of an object. help:(

From http://www.developmentnow.com/g/8_20...sion-state.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.