473,396 Members | 1,765 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.

BUG: Binary Serilization on DataSet and Windows XP in .NET Remoti

If you do .NET Remoting and Binary Serilization with DataSet it does not work.

If you set the Serialization type to Binary on DataSet, it does not seralize
it correctly on windows xp. To do this set the serilization to Binary and use
it in remoting on Windows XP.

Is there a way around this?
--
Mike
Sep 26 '06 #1
7 1919
In .NET 1.1 , DataSet only knows how to describe itself to the serialization
framework in textual XML. If this is the platform, you can use something like
Ravinder Vuppula's (Microsoft) DataSetSurrogate class, which nicely flattens
out a DataSet into mostly serializable ArrayLists, and will also reconstruct
one back to the original DataSet.
In .NET 2.0, the DataSet has a Binary SerializationFormat property , e.g.:

ds.RemotingFormat = SerializationFormat.Binary

Hope that helps.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Mike9900" wrote:
If you do .NET Remoting and Binary Serilization with DataSet it does not work.

If you set the Serialization type to Binary on DataSet, it does not seralize
it correctly on windows xp. To do this set the serilization to Binary and use
it in remoting on Windows XP.

Is there a way around this?
--
Mike
Sep 27 '06 #2
P.S.
I have never seen this so called "bug" that you describe with Windows XP. Do
you want to post a "short but complete" (a -la Jon Skeet) code sample?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Mike9900" wrote:
If you do .NET Remoting and Binary Serilization with DataSet it does not work.

If you set the Serialization type to Binary on DataSet, it does not seralize
it correctly on windows xp. To do this set the serilization to Binary and use
it in remoting on Windows XP.

Is there a way around this?
--
Mike
Sep 27 '06 #3
Mike,

I know about deseralization problems in the standard samples from Microsoft
about the dataset.

However this code should work, be aware that I translated it from a VB.Net
sample on our website so whatch typos or whatever.

\\
//Serialize
System.IO.StringWriter sw = new System.IO.StringWriter();
ds.WriteXml(sw);
string mystring = sw.ToString();
//''''''''''''''''''''''''''''''''''''''
//Deserialize
System.IO.StringReader sr = new System.IO.StringReader(mystring);
DataSet ds2 = new DataSet();
ds2.ReadXml(sr) ;
//

I hope this helps,

Cor
"Mike9900" <Mi******@discussions.microsoft.comschreef in bericht
news:F0**********************************@microsof t.com...
If you do .NET Remoting and Binary Serilization with DataSet it does not
work.

If you set the Serialization type to Binary on DataSet, it does not
seralize
it correctly on windows xp. To do this set the serilization to Binary and
use
it in remoting on Windows XP.

Is there a way around this?
--
Mike

Sep 27 '06 #4
Hello,

Set the DataSet Serialization format to Binary and use and fill some fields
and then send them to the .NET remoting server in which the server uses SQL
Server which uses DataTime type in its table. This must be done using
remoting and on windows xp. I am not sure that this may create the bug, but
I get SqlDateTime overflow, but when I use it in normal way without remoting
or with remoting on windows 2003 I do not get any error message because I set
the date to DateTime.Now.

--
Mike
"Peter Bromberg [C# MVP]" wrote:
P.S.
I have never seen this so called "bug" that you describe with Windows XP. Do
you want to post a "short but complete" (a -la Jon Skeet) code sample?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Mike9900" wrote:
If you do .NET Remoting and Binary Serilization with DataSet it does not work.

If you set the Serialization type to Binary on DataSet, it does not seralize
it correctly on windows xp. To do this set the serilization to Binary and use
it in remoting on Windows XP.

Is there a way around this?
--
Mike
Sep 27 '06 #5
Hello,

Set the DataSet Serialization format to Binary and use and fill some fields
and then send them to the .NET remoting server in which the server uses SQL
Server which uses DataTime type in its table. This must be done using
remoting and on windows xp. I am not sure that this may create the bug, but
I get SqlDateTime overflow, but when I use it in normal way without remoting
or with remoting on windows 2003 I do not get any error message because I set
the date to DateTime.Now.

--
Mike
"Cor Ligthert [MVP]" wrote:
Mike,

I know about deseralization problems in the standard samples from Microsoft
about the dataset.

However this code should work, be aware that I translated it from a VB.Net
sample on our website so whatch typos or whatever.

\\
//Serialize
System.IO.StringWriter sw = new System.IO.StringWriter();
ds.WriteXml(sw);
string mystring = sw.ToString();
//''''''''''''''''''''''''''''''''''''''
//Deserialize
System.IO.StringReader sr = new System.IO.StringReader(mystring);
DataSet ds2 = new DataSet();
ds2.ReadXml(sr) ;
//

I hope this helps,

Cor
"Mike9900" <Mi******@discussions.microsoft.comschreef in bericht
news:F0**********************************@microsof t.com...
If you do .NET Remoting and Binary Serilization with DataSet it does not
work.

If you set the Serialization type to Binary on DataSet, it does not
seralize
it correctly on windows xp. To do this set the serilization to Binary and
use
it in remoting on Windows XP.

Is there a way around this?
--
Mike


Sep 27 '06 #6
Mike9900 <Mi******@discussions.microsoft.comwrote:
Set the DataSet Serialization format to Binary and use and fill some fields
and then send them to the .NET remoting server in which the server uses SQL
Server which uses DataTime type in its table. This must be done using
remoting and on windows xp. I am not sure that this may create the bug, but
I get SqlDateTime overflow, but when I use it in normal way without remoting
or with remoting on windows 2003 I do not get any error message because I set
the date to DateTime.Now.
That's not the kind of demonstration Peter was suggesting.

See http://www.pobox.com/~skeet/csharp/complete.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 27 '06 #7
Jon,
If we would all read that Bertrand Russell quote once each morning, I
suspect the world should become a better place!
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jon Skeet [C# MVP]" wrote:
Mike9900 <Mi******@discussions.microsoft.comwrote:
Set the DataSet Serialization format to Binary and use and fill some fields
and then send them to the .NET remoting server in which the server uses SQL
Server which uses DataTime type in its table. This must be done using
remoting and on windows xp. I am not sure that this may create the bug, but
I get SqlDateTime overflow, but when I use it in normal way without remoting
or with remoting on windows 2003 I do not get any error message because I set
the date to DateTime.Now.

That's not the kind of demonstration Peter was suggesting.

See http://www.pobox.com/~skeet/csharp/complete.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 27 '06 #8

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

Similar topics

0
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...
8
by: Programatix | last post by:
Hi, I'm working on a project which includes XML WebServices and Windows Form application. The Windows Form application will call the XML WebServices to retrieve data from database. The data...
0
by: Programatix | last post by:
Hi, I'm previously haunted by a bug which is now in Knowledge Base Article 818587 (Fix: Regression in Dataset Serialization in Visual Studio .NET 1.1 when a datarow contains a rowError or a...
6
by: amethyste | last post by:
hello, This is my sample (simplified): public class Binom { public string _Value;
1
by: Taiwo | last post by:
I generated a Typed Dataset class including a base64Binary column. This column was specified as a .NET type of Byte() in the class that was auto-generated. I set the value of this property to New...
12
by: ABC - Sébastien Beaugrand | last post by:
Hi, I've been trying to get an answer from french newsgroup but I did'nt succeed in this, so I'll try on this group and sorry for my poor english. The description of the bug : The...
1
by: Irfan | last post by:
hi, all I created a dataset using dataadpater.fill and then serilized it to a filestream using binaryFormatter.serialize(fs,ds). After deserlizing i want this dataset to be attached to a...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 342 open (-38) / 3712 closed (+54) / 4054 total (+16) Bugs : 951 open (-14) / 6588 closed (+33) / 7539 total (+19) RFE : 257 open...
0
by: zw | last post by:
Hi I have problems displaying binary values on cells on the GUI. The program crashed with following dialog box: "The following exception occurred in the DataGridView:...
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
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
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?
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.