PC Review


Reply
Thread Tools Rate Thread

Dataset serialization

 
 
=?Utf-8?B?QnJpYW4gS2VhdGluZw==?=
Guest
Posts: n/a
 
      25th Jul 2005
wonder if anyone can help me here,
i've a framework 1.1 dataset which i serialize in framework 1.1 and
deserialize in framework 2.0.

This is fine, problem is that i want to modify some of the records in
framework 2.0 and serialize the data so framework 1.1 can deserialize it and
do what it required.

Is this possible?

I know for DateTime that I can work around serialization problems with the
SpecifyKind command, is there anything I can do?

thanks for any help
Brian Keating
 
Reply With Quote
 
 
 
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      25th Jul 2005
Hi,

AFAIK you can do it, have you tried it?

Dataset serialize in a XML file, so I bet it will be interpreted correctly
in 1.1

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



"Brian Keating" <(E-Mail Removed)> wrote in message
news:49A2FC30-B7A6-4711-9337-(E-Mail Removed)...
> wonder if anyone can help me here,
> i've a framework 1.1 dataset which i serialize in framework 1.1 and
> deserialize in framework 2.0.
>
> This is fine, problem is that i want to modify some of the records in
> framework 2.0 and serialize the data so framework 1.1 can deserialize it
> and
> do what it required.
>
> Is this possible?
>
> I know for DateTime that I can work around serialization problems with the
> SpecifyKind command, is there anything I can do?
>
> thanks for any help
> Brian Keating



 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gS2VhdGluZw==?=
Guest
Posts: n/a
 
      26th Jul 2005
Hi Ignacio,

Yes I've tried it with a very simple dataset, one table with one column, i
create one recored.

2.0 can interperate the 1.1 xml serialized file, not the other way around.
And this is with xml, binary gets even worse (or better depending on view
point)
2.0 binary serialization has been greatly improved in that it's no longer
binary serialized xml.


Basically i was wondering was there an property something like
SerializeAsFramework_1.1 which there isn't.

as a comparison consider Winword, you can save you office 2003 winword
document as a word97 file, it's this type of stuff i required.

Anyways not to worry, i'll just have to create my own data object and use
this for serialization until bother ends of my solution are framework 2.0.


Thanks for you help all the same.

Regards
Brian

"Ignacio Machin ( .NET/ C# MVP )" wrote:

> Hi,
>
> AFAIK you can do it, have you tried it?
>
> Dataset serialize in a XML file, so I bet it will be interpreted correctly
> in 1.1
>
> cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
>
> "Brian Keating" <(E-Mail Removed)> wrote in message
> news:49A2FC30-B7A6-4711-9337-(E-Mail Removed)...
> > wonder if anyone can help me here,
> > i've a framework 1.1 dataset which i serialize in framework 1.1 and
> > deserialize in framework 2.0.
> >
> > This is fine, problem is that i want to modify some of the records in
> > framework 2.0 and serialize the data so framework 1.1 can deserialize it
> > and
> > do what it required.
> >
> > Is this possible?
> >
> > I know for DateTime that I can work around serialization problems with the
> > SpecifyKind command, is there anything I can do?
> >
> > thanks for any help
> > Brian Keating

>
>
>

 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      26th Jul 2005
Hi,

What is the differences you see in both xml files ?

I haven't read nothing like that, but it worries me now as I'm planning to
have a similar escenario sometimes soon.


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



"Brian Keating" <(E-Mail Removed)> wrote in message
news:B1E7DAB9-69E4-4703-95AF-(E-Mail Removed)...
> Hi Ignacio,
>
> Yes I've tried it with a very simple dataset, one table with one column, i
> create one recored.
>
> 2.0 can interperate the 1.1 xml serialized file, not the other way around.
> And this is with xml, binary gets even worse (or better depending on view
> point)
> 2.0 binary serialization has been greatly improved in that it's no longer
> binary serialized xml.
>
>
> Basically i was wondering was there an property something like
> SerializeAsFramework_1.1 which there isn't.
>
> as a comparison consider Winword, you can save you office 2003 winword
> document as a word97 file, it's this type of stuff i required.
>
> Anyways not to worry, i'll just have to create my own data object and use
> this for serialization until bother ends of my solution are framework 2.0.
>
>
> Thanks for you help all the same.
>
> Regards
> Brian
>
> "Ignacio Machin ( .NET/ C# MVP )" wrote:
>
>> Hi,
>>
>> AFAIK you can do it, have you tried it?
>>
>> Dataset serialize in a XML file, so I bet it will be interpreted
>> correctly
>> in 1.1
>>
>> cheers,
>>
>> --
>> Ignacio Machin,
>> ignacio.machin AT dot.state.fl.us
>> Florida Department Of Transportation
>>
>>
>>
>> "Brian Keating" <(E-Mail Removed)> wrote in message
>> news:49A2FC30-B7A6-4711-9337-(E-Mail Removed)...
>> > wonder if anyone can help me here,
>> > i've a framework 1.1 dataset which i serialize in framework 1.1 and
>> > deserialize in framework 2.0.
>> >
>> > This is fine, problem is that i want to modify some of the records in
>> > framework 2.0 and serialize the data so framework 1.1 can deserialize
>> > it
>> > and
>> > do what it required.
>> >
>> > Is this possible?
>> >
>> > I know for DateTime that I can work around serialization problems with
>> > the
>> > SpecifyKind command, is there anything I can do?
>> >
>> > thanks for any help
>> > Brian Keating

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gS2VhdGluZw==?=
Guest
Posts: n/a
 
      26th Jul 2005
Hi again,

There are quite a few changes, by looking at the xml generated from a simple
one column one record table serialized to a file. see end of post.
Datasets have version breaking changes namely (DataSet.GetObjectData,
DataTable.GetObjectData), the serialization is just different so there ain't
no way around it that i can think of, unless you create ur own serialization
but this is even more hassle.

I've just created a Datastructure with the information i need and put a
"TODO: Remove all this nonsence when server moves to famework 2.x") in my
code.

Bit of a pity really but sure i've only a few month to wait for 2.0.

here are the two files if you're interested.

regds
Brian Keating ei9fxb

======myfile1.1.bin==========
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1ataSet id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D1.0.5000.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<XmlSchema id="ref-3"><?xml version="1.0" encoding="utf-16"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="en-IE">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="table2">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"
msdata:targetNamespace="" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema></XmlSchema>
<XmlDiffGram id="ref-4"><diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet><table2
diffgr:id="table21" msdata:rowOrder="0"
diffgr:hasChanges="inserted"><name>brian</name></table2></NewDataSet></diffgr:diffgram></XmlDiffGram>
</a1ataSet>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
======myfile1.1.bin==========


======myfile2.0.bin==========
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1ataSet id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<DataSet.RemotingVersion href="#ref-3"/>
<DataSet.RemotingFormat xsi:type="a1:SerializationFormat"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">Xml</DataSet.RemotingFormat>
<SchemaSerializationMode.DataSet xsi:type="a1:SchemaSerializationMode"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">IncludeSchema</SchemaSerializationMode.DataSet>
<XmlSchema id="ref-4"><?xml version="1.0" encoding="utf-16"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="table2">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"
msdata:targetNamespace="" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema></XmlSchema>
<XmlDiffGram id="ref-5"><diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet><table2
diffgr:id="table21" msdata:rowOrder="0"
diffgr:hasChanges="inserted"><name>brian</name></table2></NewDataSet></diffgr:diffgram></XmlDiffGram>
</a1ataSet>
<a2:Version id="ref-3" xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
<_Major>2</_Major>
<_Minor>0</_Minor>
<_Build>1</_Build>
<_Revision>-1</_Revision>
</a2:Version>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

======myfile2.0.bin==========


"Ignacio Machin ( .NET/ C# MVP )" wrote:

> Hi,
>
> What is the differences you see in both xml files ?
>
> I haven't read nothing like that, but it worries me now as I'm planning to
> have a similar escenario sometimes soon.
>
>
> cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
>
> "Brian Keating" <(E-Mail Removed)> wrote in message
> news:B1E7DAB9-69E4-4703-95AF-(E-Mail Removed)...
> > Hi Ignacio,
> >
> > Yes I've tried it with a very simple dataset, one table with one column, i
> > create one recored.
> >
> > 2.0 can interperate the 1.1 xml serialized file, not the other way around.
> > And this is with xml, binary gets even worse (or better depending on view
> > point)
> > 2.0 binary serialization has been greatly improved in that it's no longer
> > binary serialized xml.
> >
> >
> > Basically i was wondering was there an property something like
> > SerializeAsFramework_1.1 which there isn't.
> >
> > as a comparison consider Winword, you can save you office 2003 winword
> > document as a word97 file, it's this type of stuff i required.
> >
> > Anyways not to worry, i'll just have to create my own data object and use
> > this for serialization until bother ends of my solution are framework 2.0.
> >
> >
> > Thanks for you help all the same.
> >
> > Regards
> > Brian
> >
> > "Ignacio Machin ( .NET/ C# MVP )" wrote:
> >
> >> Hi,
> >>
> >> AFAIK you can do it, have you tried it?
> >>
> >> Dataset serialize in a XML file, so I bet it will be interpreted
> >> correctly
> >> in 1.1
> >>
> >> cheers,
> >>
> >> --
> >> Ignacio Machin,
> >> ignacio.machin AT dot.state.fl.us
> >> Florida Department Of Transportation
> >>
> >>
> >>
> >> "Brian Keating" <(E-Mail Removed)> wrote in message
> >> news:49A2FC30-B7A6-4711-9337-(E-Mail Removed)...
> >> > wonder if anyone can help me here,
> >> > i've a framework 1.1 dataset which i serialize in framework 1.1 and
> >> > deserialize in framework 2.0.
> >> >
> >> > This is fine, problem is that i want to modify some of the records in
> >> > framework 2.0 and serialize the data so framework 1.1 can deserialize
> >> > it
> >> > and
> >> > do what it required.
> >> >
> >> > Is this possible?
> >> >
> >> > I know for DateTime that I can work around serialization problems with
> >> > the
> >> > SpecifyKind command, is there anything I can do?
> >> >
> >> > thanks for any help
> >> > Brian Keating
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet - Custom XML Serialization Just D. Microsoft C# .NET 2 29th Apr 2009 09:03 AM
DataSet lost row in serialization =?Utf-8?B?TWF1cmljaW8gUGlyZXM=?= Microsoft Dot NET Framework 1 17th Jan 2005 11:25 AM
Serialization of arrays in dataset =?Utf-8?B?Q29s?= Microsoft Dot NET Compact Framework 0 10th Nov 2004 11:10 AM
DataSet serialization Viorel Ghilas Microsoft ADO .NET 2 6th Feb 2004 01:46 PM
DataSet serialization Viorel Ghilas Microsoft Dot NET Framework 0 4th Feb 2004 09:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:03 AM.