473,660 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1937
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) DataSetSurrogat e 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 SerializationFo rmat property , e.g.:

ds.RemotingForm at = SerializationFo rmat.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.Strin gWriter sw = new System.IO.Strin gWriter();
ds.WriteXml(sw) ;
string mystring = sw.ToString();
//''''''''''''''' ''''''''''''''' ''''''''
//Deserialize
System.IO.Strin gReader sr = new System.IO.Strin gReader(mystrin g);
DataSet ds2 = new DataSet();
ds2.ReadXml(sr) ;
//

I hope this helps,

Cor
"Mike9900" <Mi******@discu ssions.microsof t.comschreef in bericht
news:F0******** *************** ***********@mic rosoft.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.Strin gWriter sw = new System.IO.Strin gWriter();
ds.WriteXml(sw) ;
string mystring = sw.ToString();
//''''''''''''''' ''''''''''''''' ''''''''
//Deserialize
System.IO.Strin gReader sr = new System.IO.Strin gReader(mystrin g);
DataSet ds2 = new DataSet();
ds2.ReadXml(sr) ;
//

I hope this helps,

Cor
"Mike9900" <Mi******@discu ssions.microsof t.comschreef in bericht
news:F0******** *************** ***********@mic rosoft.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******@discu ssions.microsof t.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.co m>
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******@discu ssions.microsof t.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.co m>
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
1084
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 returned as DataSet. Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset returned contain errors (marked by calling the SetColumnError() method or
8
2395
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 will be returned as DataSet. Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset returned contain errors (marked by calling the SetColumnError() method or
0
1212
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 ColumnError Property) which can be found at http://support.microsoft.com/default.aspx?scid=kb;en-us;818587. Please note that this bug only shows itself if the Windows Form Application is run on dotNetFramework 1.1 but does not shows itself if the same...
6
2827
by: amethyste | last post by:
hello, This is my sample (simplified): public class Binom { public string _Value;
1
6597
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 Byte() {} (i.e. Byte array with zero elements) in a row of an instance of the class prior to serialization using the binary formatter. When I attempt to DeSerialize the instance, the following exception is thrown: :...
12
1755
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 CurrentChanged event from the BindinManager on a Winform never occurs with framework V1.1. and it is not possible from the bindings to know if the user has done some modifications.
1
941
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 dataAdapter to do some updates in the the actual .mdb datatable. so my question is how do i attach a dataset to a dataadapter to acheive this. i cant find any method in dataadapter that will do it. any suggestions please
0
11343
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 (-15) / 266 closed (+13) / 523 total ( -2) New / Reopened Patches ______________________
0
1341
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: System.ArgumentException: Parameter is not valid at System.Drawing.Image.FromStream(... at System.Drawing.ImageConverter.ConvertFrom(... at System.Windows.Forms.Formatter.FormatObjectInternal(...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.