473,625 Members | 3,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2588
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.co m
"Peter" <pc*****@online .nospam> wrote in message news:uC******** *******@TK2MSFT NGP15.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.c om> wrote in message news:%2******** **********@TK2M SFTNGP14.phx.gb l...
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.co m
"Peter" <pc*****@online .nospam> wrote in message news:uC******** *******@TK2MSFT NGP15.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.mic rosoft.com> wrote in message
news:U9******** ********@TK2MSF TNGXA02.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
1701
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 something i can do before I serialize? ie myStringwriter.Removearrays(); Or am I basically stuck... Thanks, Jason Shohet
14
14294
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
2134
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" ); x.Serialize( writer, aPeople ); Now I have also an array "aAnimal" with animal objects. Is there a way to put this in the same data.xml file?
7
3537
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 TypeConverter other than ReferenceConverter to be put in viewstate." I've included the <Serializable()> attribute, but I'm still getting the same error. The class is below ... as you can see it contains a Collection, two
18
2324
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 javascript function that will serialize the object so that it can be stored and retrieved as strings? Thanks.
2
35663
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 the saved settings Can anyone see something that I have missed ?
2
1942
by: Leon_Amirreza | last post by:
How can I serialize a uint Type into a Byte?
1
4175
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
1978
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 arrays holding various data types. Is there a formal spec for how serialize() does it's thing? I can certainly intuit much of this from looking at the results but I don't want to miss coding for some (obscure) data type. Daniel Klein
0
8256
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8635
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.