Re: Web Service and Client



MY OWN PARTIAL ANSWER - Of course the datarelation creates FK's! We now
wonder though why this doesn't remove the FK's automatically

if aDataSet.Relations.Contains(aRelation) and
aDataSet.Relations.CanRemove(aDataSet.Relations.Item[aRelation])
then
aDataSet.Relations.Remove(aDataSet.Relations.Item[aRelation]);

ADDITIONALLY to initial message - the ClientDataSet is first retrieved
into a TempDataSet which is used with TempDataSet.Tables[].Copy
function to get the table to add to the ClientDataSet.


zchrs wrote:
Introduction (as short and concise as possible!) - My colleague and I
are new to ADO DotNet. We have as a reference the excellent Microsoft
book by David Sceppa. Dev. environment is Delphi 2006 (not very
important in this context as far as I can see). We are developing a Web
Service (WS) which returns untyped ADO DotNet datasets built from
Stored Procedures with joins from a Firebird database.

We are also developing a Windows Client for the WS. For each request
the client retrieves a dataset, pulls a table out of it and adds this
table to ONE master dataset on the client. One problem we've run into
is that its not possible to add the same table of course to a dataset.
So far we've managed to handle this by Remove table from dataset.

We've now run into a problem where our dataset comes over from WS with
tables that have DataRelations. We've tried removing DataRelations but
get a foreign key error. We haven't put any FK's on the tables (unless
building the DataRelation is what does this) so we don't understand why
this error occurs.

EX. myClientDataSet = WS.CustomerDataSet; //has table Customers
//Check if my table Customers already is in myClientDataSet if
so remove if CanRemove
//Else just add Customers to myClientDataSet

Perhaps our main problem is we are handling this scenario all wrong -
i.e. WS sending datasets, client pulling tables from the datasets and
adding all tables to one SINGULAR Client data set - we are simply not
sure. At first we used separate data sets on the client but it seems to
us the single ds is correct as we assume the idea is to emulate the db
so for example if there are contraints to enforce its all in the on
dataset?????

In that we are using joins to supply the data, we are also concerned
that our updates will be at best difficult - but I'll get back to that
question!

Thanks for any and all assistance on this

.



Relevant Pages

  • Re: DataSet is fast. MarshalByRef objects - slow
    ... There are several methods on the client side that will perform some ... from application server and then enumerate its properties. ... converted to the two data tables in the data set. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Web Service and Client
    ... DATASET Merge method and where we only want the last retrieved rows to ... We are also developing a Windows Client for the WS. ... tables that have DataRelations. ... adding all tables to one SINGULAR Client data set - we are simply not ...
    (microsoft.public.dotnet.framework.adonet)
  • Web Service and Client
    ... Service which returns untyped ADO DotNet datasets built from ... We are also developing a Windows Client for the WS. ... tables that have DataRelations. ... adding all tables to one SINGULAR Client data set - we are simply not ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: DataSet serialization
    ... Just construct an instance of your typed data set on the client, ... Merge method to pull in the data from the generic data set returned by the ... MyTypedDataSet tds = new MyTypedDataSet; ...
    (microsoft.public.dotnet.framework.adonet)

Loading