S
sjoshi
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
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