G
Guest
I have two classes I serialize and store in a Jet database as blobs. When I
need these later, I reverse the process. The basic code:
// Serialize
MemoryStream ms = new MemoryStream();
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(ms, Class1Instance);
Byte [] Class1Blob = ms.ToArray();
(DataRow) row["Blobfield"] = Class1Blob;
// repeat for Class2
// Deserialize - Basically the reverse of above.
Byte [] Class1Blob;
Class1Blob = (Byte[]) row["BlobField"];
MemoryStream ms = new MemoryStream(Class1Blob);
BinaryFormatter bf = new BinaryFormatter();
Class1Instance = (Class1) bf.Deserialize(ms);
The problem. We supply these serialized classes so that other systems can
read them from the database and use them. This code has worked for some time.
However, when we recently tried it on a system with a German version of
Windows (XP home), the deserialization process threw an exception for the
second class. My German isn't so good, but I don't think this message is too
useful anyway.
"Ein Aufrufziel hat einen Ausnahmefeher verursacht"
Is there anything in the language variations of the OS or Framework that
would cause this type of behaviour?
Thanks in advance
need these later, I reverse the process. The basic code:
// Serialize
MemoryStream ms = new MemoryStream();
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(ms, Class1Instance);
Byte [] Class1Blob = ms.ToArray();
(DataRow) row["Blobfield"] = Class1Blob;
// repeat for Class2
// Deserialize - Basically the reverse of above.
Byte [] Class1Blob;
Class1Blob = (Byte[]) row["BlobField"];
MemoryStream ms = new MemoryStream(Class1Blob);
BinaryFormatter bf = new BinaryFormatter();
Class1Instance = (Class1) bf.Deserialize(ms);
The problem. We supply these serialized classes so that other systems can
read them from the database and use them. This code has worked for some time.
However, when we recently tried it on a system with a German version of
Windows (XP home), the deserialization process threw an exception for the
second class. My German isn't so good, but I don't think this message is too
useful anyway.
"Ein Aufrufziel hat einen Ausnahmefeher verursacht"
Is there anything in the language variations of the OS or Framework that
would cause this type of behaviour?
Thanks in advance