473,396 Members | 2,029 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 1435
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
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
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...

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.