473,725 Members | 2,272 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 2593
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
1703
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
14305
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
2139
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
3541
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
2350
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
35758
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
1954
by: Leon_Amirreza | last post by:
How can I serialize a uint Type into a Byte?
1
4177
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
1982
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
9400
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8084
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6700
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
6009
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();...
0
4508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3217
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
2
2631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2154
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.