Serialize Arrays

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

I have large arrays or Array type I am planning to Serialize and save the serialized data into Access database as memo field.

My question is: Is it safe to save this data in that format, will I be able to read this serialized data back from the database with the next version of .NET (.NET 3.0), or is it a dangerous assumption?


Thanks


Peter
 
Peter,

As long as you don't make changes to YOUR type that you are serializing (or the types that are in the array), then you won't have a problem (or at least, you shouldn't). If you are storing types that are in the framework, then there is a chance that those will be changed in the next iteration, but you can get around that with binders and formatters.

Also, .NET 3.0 isn't going to be released to market for at least a year (and this is not even realistic, IMO), are you sure you need to have your objects sitting around for that long in your DB?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
I have large arrays or Array type I am planning to Serialize and save the serialized data into Access database as memo field.

My question is: Is it safe to save this data in that format, will I be able to read this serialized data back from the database with the next version of .NET (.NET 3.0), or is it a dangerous assumption?


Thanks


Peter
 
Peter,

As long as you don't make changes to YOUR type that you are serializing (or the types that are in the array), then you won't have a problem (or at least, you shouldn't). If you are storing types that are in the framework, then there is a chance that those will be changed in the next iteration, but you can get around that with binders and formatters.

Also, .NET 3.0 isn't going to be released to market for at least a year (and this is not even realistic, IMO), are you sure you need to have your objects sitting around for that long in your DB?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
I have large arrays or Array type I am planning to Serialize and save the serialized data into Access database as memo field.

My question is: Is it safe to save this data in that format, will I be able to read this serialized data back from the database with the next version of .NET (.NET 3.0), or is it a dangerous assumption?


Thanks


Peter

Most likely the data won't be around that long, but few records probably will servive. Year from now I will be still using the current format and .NET 3.0 will be a reality, I have never used serialization before that's why I am asking how often does this format change. I can move the data from the array into a long string, but that's a lot of work specialy when serialization is already done and fast.
 
Hi Peter,

It's not a good practice to store the serialized data into Memo field. If
you use a BinaryFormatter, you will get binary data. So you have to store
it to an OLE Object column.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Kevin Yu said:
Hi Peter,

It's not a good practice to store the serialized data into Memo field. If
you use a BinaryFormatter, you will get binary data. So you have to store
it to an OLE Object column.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Thanks heads up, I am sure I would found that out sooner or later, you saved
me few hours of work.
 
You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top