[sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Dorababu Meka
Hi I am using SQLLITE database in my .net application. Unfortunately if I perform any operation like Insert and performing other operations like getting data from database my Session which was assigned before is getting * NULL.* Is this a bug or what, have you fixed this in later versions, if so pl

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread TeDe
Am 10.04.2012 11:17, schrieb Dorababu Meka: > Hi I am using SQLLITE database in my .net application. Unfortunately if I > perform any operation like Insert and performing other operations like > getting data from database my Session which was assigned before is getting * > NULL.* Is this a bug or w

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Dorababu Meka
This is my code that I have written in .Net protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["x"] = "session value"; // assigning Session } } My code to insert data to the Database is as follows protected void Button1_

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Taleeb Anwar
Though I don't know much about .NET...still Try the following Comment the execute non query. Now Click on button 1 (no values will be inserted) and then on button 2. Is session value retained or lost? Thanks & Regards Taleeb Anwar *Hai Ab bhi Tera "Shwarma" Afsana Khwan Humara!!* On Tue, Apr

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Dorababu Meka
How Can I insert data in to the table if I comment that line as per you said.. Session value exists if I comment that line.. On Tue, Apr 10, 2012 at 6:20 PM, Taleeb Anwar wrote: > Though I don't know much about .NET...still > > Try the following > Comment the execute non query. Now Click on but

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Taleeb Anwar
Of course the value will not be inserted - but just wanted to make sure that the problem is occurring on insertion..! Thanks & Regards Taleeb Anwar *Hai Ab bhi Tera "Shwarma" Afsana Khwan Humara!!* On Tue, Apr 10, 2012 at 6:23 PM, Dorababu Meka wrote: > How Can I insert data in to the table

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-10 Thread Dorababu Meka
Yeah on Inserting or Updating the session is getting *NULL* On Tue, Apr 10, 2012 at 6:25 PM, Taleeb Anwar wrote: > Of course the value will not be inserted - but just wanted to make sure > that the problem is occurring on insertion..! > > Thanks & Regards > Taleeb Anwar > > *Hai Ab bhi Tera "Shw

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-11 Thread Taleeb Anwar
Ok. Here's what I guess is happening. You are making changes in you db file which is stored inside your bin directory. When there is a change in the bin directory* the App pool recycles *and thus you loose the session variable. There must be several ways of avoiding it - perhaps the following will

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-11 Thread Dorababu Meka
Ok but I am using Mysql too in my application if I use that I am getting an error as *Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted.

Re: [sqlite] Issue with Session while using SQLLITE database

2012-04-11 Thread Taleeb Anwar
As the error suggests you need to serialize you session object when using "State Server". See an example here - http://nareshkamuni.blogspot.in/2011/12/example-of-stateserver-session-mode-in.html(note the [serializable] tag). Maybe someone else may explain which will be a better option (to use sta