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

Dataset serialization

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
Nov 17 '05 #1
4 7449
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" <Br**********@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
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

Nov 17 '05 #2
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" <Br**********@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
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


Nov 17 '05 #3
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" <Br**********@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com...
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" <Br**********@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
> 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


Nov 17 '05 #4
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>
<a1:DataSet 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>
</a1:DataSet>
</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>
<a1:DataSet id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D2.0.0.0%2C%20Culture%3D neutral%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%3D neutral%2C%20PublicKeyToken%3Db77a5c561934e089">Xm l</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%3D neutral%2C%20PublicKeyToken%3Db77a5c561934e089">In cludeSchema</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>
</a1:DataSet>
<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" <Br**********@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com...
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" <Br**********@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
> 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


Nov 17 '05 #5

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

Similar topics

6
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
1
by: ofer | last post by:
Hi, I am working with the beta version of the new .net framework (Whidbey) and I encountered a problem with serialization that did'nt exist in the .net 2003 the situation is like this : I have...
4
by: hs | last post by:
Hi I am serializing a dataset using a binary formatter as follows: IFormatter formater = new BinaryFormatter(); formatter.Serialize(stream, ds); // ds=DataSet, stream=MemoryStream .... DataSet...
2
by: ofer | last post by:
Hi, I am working with the beta version of the new .net framework (Whidbey) and I encountered a problem with serialization that did'nt exist in the .net 2003 the situation is like this : I have...
0
by: MattB | last post by:
I have a dataset that originated as a string (passed from a C++ dll). I de-serialize it, use the data, and then in some cases I will serialize it again to pass as a session variable in my app and...
1
by: J. Askey | last post by:
I am implementing a web service and thought it may be a good idea to return a more complex class (which I have called 'ServiceResponse') in order to wrap the original return value along with two...
5
by: Istvan Loerincz | last post by:
Can somebody argue why its good to use Datasets to save XML data ? The flexibility of XML is gone, if I do that. I have an XML file, which I have to read in and work with. So I ask myself...
7
by: =?Utf-8?B?ZG91Zw==?= | last post by:
Have loaded balanced web servers that we do not allow to connect to our database. Content is created and pushed to these sites. I want to add a web service that may get multiple requests a second...
5
by: codefragment | last post by:
Hi I have a dataset which holds (amongest other things) a string. - The dataset gets loaded from the database via a middle tier - The string value contains "\r\n" - Its serialised to the web...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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...

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.