473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2572
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason Shohet | last post by:
There's a 3rd party object that I have, which has a multi-dimensional array on it. I'm getting an error about that multi-dimensional array -- that I can't serialize with it in there. Is there...
14
by: vince | last post by:
Can I add (append) to an xml file that already contains a serialized object, and be able to deserialize to either or both objects from the same file...??? How is this done...?? thanks, vince
5
by: Arjen | last post by:
Hello, I have an array "aPeople" with people objects which I serialize like this: XmlSerializer x = new XmlSerializer( typeof(People) ); TextWriter writer = new StreamWriter( "data.xml" );...
7
by: Ben Amada | last post by:
I've created a class that I need to store in ViewState. However when I try to store it in ViewState, I get the following error: "The type 'solution.pe2' must be marked as Serializable or have a...
18
by: yusuf | last post by:
I basically want to be able to store and retrieve a tree structure in greasemonkey. Unfortunately the GM_setValue and GM_getValue functions only take string key value pairs. Is there a native...
2
by: Joe | last post by:
Hi I have a Generics List in a PropertyGrid I am able to Serialize it to XML but when I try to deserialize back to the class of the PropertyGrid The Constructor doesn't seem to fire to reload...
2
by: Leon_Amirreza | last post by:
How can I serialize a uint Type into a Byte?
1
by: =?iso-8859-1?q?Norbert_P=FCrringer?= | last post by:
Hello there, I want to serialize a twodimensional array: e.g. public string Table { get { return _table; } set { _table = value; }
2
by: Daniel Klein | last post by:
It looks like I'm going to have to write programs in another language to encode and decode php serialized data. I am really only interested in the permutations of how it encodes multi-dimensioned...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.