473,396 Members | 1,998 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,396 software developers and data experts.

Serialization and UDTs (Visual Basic.Net)

I have not planned data persistence at the beginning of a
larger project. This now causes some problems.
Doing some tests, I have figured out how to serialize and
deserialize simple variables as well as a sorted list.
Here is the problem:
My classes contain both, a sorted list and simple data
types. Two classes contain two sorted lists each. There
are no errors in the serialization part (on closing),
however, there is a problem deserializing the data.
According to the error message, there is a casting
problem.
How do I get the deserializer to understand the data
structure? Does anyone know a good example for
using "ideserialize" in VB? Should I rather serialize
ILists (more than one set)?
How are serialized data stored? Will they be deserialized
sequentially, moving through all data and data sets? For
two sorted lists that would be IList1(keylist)+ IList
(valuelist) + Ilist2(keylist) + IList2(valuelist). I
already put default values into all empty fields to avoid
errors. Still, serialization has not worked this way.

Thanks for any pointers,

Ursula
Jul 21 '05 #1
1 1434
The solution is a restructured program with a few more
components and 2 global variables. However, the trade-off
is the ability to dynamically load and unload very small
datalists as needed.
-----Original Message-----
I have not planned data persistence at the beginning of alarger project. This now causes some problems.
Doing some tests, I have figured out how to serialize anddeserialize simple variables as well as a sorted list.
Here is the problem:
My classes contain both, a sorted list and simple data
types. Two classes contain two sorted lists each. There
are no errors in the serialization part (on closing),
however, there is a problem deserializing the data.
According to the error message, there is a casting
problem.
How do I get the deserializer to understand the data
structure? Does anyone know a good example for
using "ideserialize" in VB? Should I rather serialize
ILists (more than one set)?
How are serialized data stored? Will they be deserializedsequentially, moving through all data and data sets? For
two sorted lists that would be IList1(keylist)+ IList
(valuelist) + Ilist2(keylist) + IList2(valuelist). I
already put default values into all empty fields to avoiderrors. Still, serialization has not worked this way.

Thanks for any pointers,

Ursula
.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Bob Rock | last post by:
Hello, when serializing an array of elements of a class Classname using XmlSerializer.Serialize() I get an XML like the following: <?xml version="1.0"> <ArrayOfClassname> ....... ..........
3
by: Rhino | last post by:
I am trying to figure out if a UDF can accept a UDT (User-defined Distinct Type, *not* structured type) as one of its parameters. I'm running DB2 for Linux, Unix, and Windows V8.2 (FP 8) on Windows...
4
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes....
2
by: Dominic | last post by:
Hi everybody, I'm planning to use serialization to persist an object (and possibly its child objects) in my application. However, I'm concerned about the backward compatibility issue. I'm...
2
by: Robert Magnusson | last post by:
Hi all, I have a healthy class defined that happily serializes and deserializes from the underlying XML file. The problem I hit is that, as soon as I add an implicit conversion in any of the...
1
by: jimfollett1 via DotNetMonster.com | last post by:
Hey all, I was wondering if you could put me out of my misery (hopefully, not literaly) .. I am currently trying to port some VB6 code to VB.NET because of a possible significant performance...
1
by: Ursula Peter-Czichi | last post by:
I have not planned data persistence at the beginning of a larger project. This now causes some problems. Doing some tests, I have figured out how to serialize and deserialize simple variables as...
15
by: Herby | last post by:
This is a follow on from my previous thread about clr/safe and STL.NET ...
7
by: Joe | last post by:
I've tracked the performance issue down to a single class. This class derives from CollectionBase and stores a basic value type such as string, int, double, etc... I also store the type itself...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.