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

Sending DataSet to Remoting Service

Hi All

I have written an Windows Service that exposes a Remoting object that
takes a DataSet and fills it up. However when I get the dataset back
on the client it's rows are empty. When I log the process I can see a
filled dataset on the server.

This is what I'm doing in the client code, where dSet is an empty
initialized DataSet being sent to the server.

IPDLiceOutputFactory factory = GetRemotingFactory(server);
IPDLiceOutput output = factory.GetBuilder(source, null); //
Here I get a snapshot builder
output.FillDataSet(outputType, dSet);

The factory is...

public class ImpliedFactory: MarshalByRefObject, IPDLiceOutputFactory
{
private IPDLiceOutput GetSnapshotBuilder(string server)
{
SnapshotBuilder builder = new SnapshotBuilder(server);
return (IPDLiceOutput)builder;
}
private IPDLiceOutput GetLoggedBuilder(string server)
{
LoggedBuilder builder = new LoggedBuilder();
return (IPDLiceOutput)builder;
}

#region IPDLiceOutputFactory Members
public IPDLiceOutput GetBuilder(OutputSource builderType, string
server)
{
if (builderType == OutputSource.Snapshot)
return GetSnapshotBuilder(server);
return GetLoggedBuilder(server);
}

#endregion
}

The builder I use is...

public class SnapshotBuilder : MarshalByRefObject, IPDLiceOutput
{
private string _server;
public SnapshotBuilder(string server)
{
_server = server;
}

#region IPDLiceOutput Members

public void FillDataSet(OutputType outputType, PDliceDataSet dSet)
{
PDLiceOutput outputBuilder = new PDLiceOutput(_server,
outputType);
PDLiceDataSetBuilder dsetBuilder = new
PDLiceDataSetBuilder(outputBuilder, DateTime.Now);
dsetBuilder.FillDataSet(dSet);

}

#endregion

The interfaces are defined as...

public interface IPDLiceOutputFactory
{
IPDLiceOutput GetBuilder(OutputSource builderType, string arg);
}

public interface IPDLiceOutput
{
void FillDataSet(OutputType outputType, PDliceDataSet dSet);
}

Any ideas what might be wrong here ??

Sunit
Dec 13 '07 #1
1 1722
When you remote an instance by value, unless you have a ref or out
parameter, the details of the instance are not passed back over the remoting
channel.

Try changing your parameter to ref or out and you should see the changes
reflected back in the calling client.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sjoshi" <sj****@ingr.comwrote in message
news:ea**********************************@d21g2000 prf.googlegroups.com...
Hi All

I have written an Windows Service that exposes a Remoting object that
takes a DataSet and fills it up. However when I get the dataset back
on the client it's rows are empty. When I log the process I can see a
filled dataset on the server.

This is what I'm doing in the client code, where dSet is an empty
initialized DataSet being sent to the server.

IPDLiceOutputFactory factory = GetRemotingFactory(server);
IPDLiceOutput output = factory.GetBuilder(source, null); //
Here I get a snapshot builder
output.FillDataSet(outputType, dSet);

The factory is...

public class ImpliedFactory: MarshalByRefObject, IPDLiceOutputFactory
{
private IPDLiceOutput GetSnapshotBuilder(string server)
{
SnapshotBuilder builder = new SnapshotBuilder(server);
return (IPDLiceOutput)builder;
}
private IPDLiceOutput GetLoggedBuilder(string server)
{
LoggedBuilder builder = new LoggedBuilder();
return (IPDLiceOutput)builder;
}

#region IPDLiceOutputFactory Members
public IPDLiceOutput GetBuilder(OutputSource builderType, string
server)
{
if (builderType == OutputSource.Snapshot)
return GetSnapshotBuilder(server);
return GetLoggedBuilder(server);
}

#endregion
}

The builder I use is...

public class SnapshotBuilder : MarshalByRefObject, IPDLiceOutput
{
private string _server;
public SnapshotBuilder(string server)
{
_server = server;
}

#region IPDLiceOutput Members

public void FillDataSet(OutputType outputType, PDliceDataSet dSet)
{
PDLiceOutput outputBuilder = new PDLiceOutput(_server,
outputType);
PDLiceDataSetBuilder dsetBuilder = new
PDLiceDataSetBuilder(outputBuilder, DateTime.Now);
dsetBuilder.FillDataSet(dSet);

}

#endregion

The interfaces are defined as...

public interface IPDLiceOutputFactory
{
IPDLiceOutput GetBuilder(OutputSource builderType, string arg);
}

public interface IPDLiceOutput
{
void FillDataSet(OutputType outputType, PDliceDataSet dSet);
}

Any ideas what might be wrong here ??

Sunit
Dec 13 '07 #2

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

Similar topics

3
by: Prabhu Shastry | last post by:
Hello group, I have a Windows Service and an application (C#). Both processes need access to a single dataset object (created and modified by the service and application will only read the...
1
by: Sput | last post by:
Again me My program is running on a client computer, while on a server is running a C++ application. I need to send a message containing some numbers to it from time to time. I was thinking of...
4
by: OpticTygre | last post by:
I have a windows service, and a separate desktop application used to configure settings for the service. I'd also like to use the windows application as a sort of debug, or notification window, to...
2
by: Jonathan Woods | last post by:
Hi there, I have encountered problem of losing data sending over internet using web service. I consume web service that connected Oracle Database. I submit 687 SOAP Messages to 1 Web Method...
7
by: Mike9900 | last post by:
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...
8
by: nyhetsgrupper | last post by:
I have written a windows service and want to expose a web based user interface for this service. I then wrote a class library containing a ..net remoting server. The class library have a method...
13
by: José Joye | last post by:
Hello, What is the best way to stop a remoting server (Singleton SAO) that has been started with RemotingConfiguration.Configure(). For sure, I want to do this without quitting the application...
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
2
by: erbilkonuk | last post by:
Hi everyone, I have been developing a project that is composed of one windows service and one ASP.NET web site. The windows service and ASP.NET web site reside on the same server. I want to send...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.