Hi leandro,
I think that it's not a good idea to keep a SqlConnection on session ,
worse if you keep it open.
I instead would keep the ConnectionString and open/Close the connection on
the page as needed.
This is how you work with session variables
Session_Start ( ... )
{
//Create teh dataset
DataSet dataset = CreateDataSet();
//put it in session
Session["dataset"] = dataset;
//Get it value
DataSet copy_dataset = ( DataSet) Session["dataset"];
}
I don';t know if this make it clear for you, if not just post back the code
where you set the session variables and where you are using them.
Un Saludo desde Miami :)
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Ing. Leandro Pérez Guió" <lp****@holguin.copextel.com.cu> wrote in message
news:Oe**************@tk2msftngp13.phx.gbl...
Hello everybody:
I'm getting trouble with global.asax. Inside it, i define a sqlconnection,
a dataadapter and a dataset.
In the Session_Start i declare the session variables calls conn, da and
ds.
Later, i make a webform and when i instante the session variable da, its
point to null and the ds too.
How can i make this right...
Greetings...
Leo