Spencer,
There are multiple reasons why I don't like putting such large objects into
session state. Many will argue, but I stick by my point - stateless servers
are better. Though there is one gotcha - stateful servers are typically
lesser effort to program, but the point is they won't scale as well. So if
you need the scalability, stick with the ideal architecture. Another reason
is high availability, stateful servers mean you have one point of failure,
the IT guy reboots the machine, and everyone sits and waits.
The wizard - like any wizard - can never generate code that is as good as
handwritten code.
Specifically, the guy who told about to retreive an object from sessions
state, and then set it to new Sql... instance - that suggestion is no good
IMO because you put an object in session, and then overwrote it (lost it),
when u assigned it to a brand new instance.
The best place to start would be to read a book on ADO.NET, I've written one
and so have others, but if you have a problem description of what are you
trying to acheive, I'd be glad to help.
So for example one example problem description could be "I have a table in
the db, and I am trying to show it's contents in a paged manner". Something
like that
- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
Spencer H. Prue said:
Dear Sahil,
I initially put the sqldataadapter and the dataset into session state. On
my
other page it is telling me that the session[""]=null for both objects.
One
guy told me in a post that I shouldn't use a wizard for the ado. And
another
guy said that I should, after retrieving the objects from session state,
set
them = new sql... and new dataset and then use them. I was originally
told
to use session state instead of application state and cache. So I have a
lot
to think about and am basically starting over with the whole thing. Let me
know what to do...Thanks
Spencer
Sahil Malik said:
What exactly are you loading into session state?
I am a big proponent of trying to stay away from session and dependence
on
it, because it leads you to create stateful servers.
But you can't load "ADO" into session, what "ADO.NET Object" are you
loading
into session?
- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
message