473,473 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I want to serialize SqlCommand

Hi,

I want to serialize SqlCommand in a component, but my sample doesn't work.
Any idea?

public partial class SglQuery : Component
{
public SglQuery()
{
InitializeComponent();
}

public SglQuery(IContainer container)
{
container.Add(this);

InitializeComponent();
}
private SqlCommand _selectCommand;
[System.ComponentModel.DesignerSerializationVisibil ityAttribute(DesignerSerializationVisibility.Visib le)]
public SqlCommand SelectCommand
{
get
{
if ((this._selectCommand == null))
this._selectCommand = new
System.Data.SqlClient.SqlCommand();
return this._selectCommand;
}
set
{
this._selectCommand = value;
}
}
}

Thanks in advance.

Hervé RESCOURIO
Jul 21 '05 #1
0 1502

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

Similar topics

0
by: Hervé RESCOURIO | last post by:
Hi, I want to serialize SqlCommand in a component, but my sample doesn't work. Any idea? public partial class SglQuery : Component { public SglQuery() { InitializeComponent();
4
by: Graham Like | last post by:
I read a lot about serialising things to XML. Can someone give me some examples of why I would want to do this? I seem to be missing the point.
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
10
by: Dan | last post by:
All I Am Attempting To Serialize An Object To An XML File. Here Is The Code For That public string SaveNewSurvey( MutualSurveyObject mso_TempObject, int i_JobID ) { string s_RootFileName;...
1
by: js | last post by:
Does anybody knows how to solve the problem? I added attribute to the following classes in Microsoft.Practices.EnterpriseLibrary.Data namespace, but I still get the error. Thanks. ...
8
by: cd~ | last post by:
I can provide a test app, the news server won't allow me to post the files because they are too large (93KB and 1.2KB) I downloaded the ESRI ArcXml schema and generated the classes from the...
1
by: Tim | last post by:
Could anyone tell me what this means and how do I correct it. Any suggestions? Thanks! Tim Richardson IT Developer and Consultant www.paladin3d.com Unable to serialize the session state. In...
1
by: job | last post by:
how is it possible to serialize/de-serialize a SqlCommand?
0
by: Redowl | last post by:
Hi, I am trying to serialize a business object using xml generated by a FOR XML query and the resulting xml has no root element. I have created my business object using the schema returned from...
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
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,...
1
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
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...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
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.