serialize object and store in a database

T

Tony Johansson

Hi!

Is it common to serialized object and then store it in a database ?

//Tony
 
M

Mr. Arnold

Tony said:
Hi!

Is it common to serialized object and then store it in a database ?

//Tony

Yeah, I do it with keeping Web session variable of object or object
graphic and serialize it to save to a Varchar(max), using
XMLseralization on the object to serialize and deserialize the object.

It's done for session timeout to to keep object state and restore object
back to its state at time of timeout.

Of course, the SQL server record is using an Identity key, sessionid or
user-id and or some other type of information to make it unique with
date and timestamp so I and query the database to get the object back to
deserialize it back to the object or object graph and but it back into
session.
 
A

Arne Vajhøj

Is it common to serialized object and then store it in a database ?

In all C# code: no - it happens occasionally

In C# code that serializes to memory stream: yes - it is one of the
common reasons

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top