471,627 Members | 1,505 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Serialize Arrays

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

Dec 5 '05 #1
5 2520
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]
- mv*@spam.guard.caspershouse.com
"Peter" <pc*****@online.nospam> wrote in message news:uC***************@TK2MSFTNGP15.phx.gbl...
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

Dec 5 '05 #2

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:%2******************@TK2MSFTNGP14.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com
"Peter" <pc*****@online.nospam> wrote in message news:uC***************@TK2MSFTNGP15.phx.gbl...
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.
Dec 5 '05 #3
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."

Dec 6 '05 #4

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:U9****************@TK2MSFTNGXA02.phx.gbl...
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.
Dec 6 '05 #5
You're welcome.

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

Dec 7 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by vince | last post: by
7 posts views Thread by Ben Amada | last post: by
18 posts views Thread by yusuf | last post: by
2 posts views Thread by Joe | last post: by
2 posts views Thread by Leon_Amirreza | last post: by
1 post views Thread by =?iso-8859-1?q?Norbert_P=FCrringer?= | last post: by
2 posts views Thread by Daniel Klein | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.