Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

Welcome, Guest
Guest Settings

Thread: ApplyUpdates causes Remote Error

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 0
Ahmed Sayed

Posts: 173
Registered: 8/9/07
ApplyUpdates causes Remote Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 24, 2015 11:44 AM
Hello everyone,

I am facing a very weird problem creating a DataSnap client server application, on the server I have one TADODataSet with CommandType set to cmdUnkown and a TDataSetProvider set to poAllowCommandText; the provider is exported and resolved to Dataset; the LifeCycle of the server class is set to invocation because I want to make the server to be stateless.
On the client side I have everything working fine regarding opening the ClientDataSet but when I make any changes and ApplyUpdates the error happens:

//Server Side
DSServerModule = Owner;
DataSet = new TADODataSet(Owner);
DataSet->Connection = Con;
DataSet->Name = “customerDataSet";
DataSet->CommandType = cmdUnknown;
Provider = new TDataSetProvider(NULL);
Provider->ResolveToDataSet = true;
Provider->Exported = true;
Provider->Options = Provider->Options << poAllowCommandText;
Provider->DataSet = DataSet;
Provider->Name = "customerDSProvider";
DSServerModule->RegisterProvider( Provider);
//Client Side
//Open Click
//Apply Click
if (ClientDataSet1->ChangeCount > 0)

I get this error: “Remote error: customerDataSet: Missing CommandText property.”

I know that if I set the server life cycle to Session it will work fine. But I want to make its life cycle set to Invocation.

Also even if used Session life cycle whenever I update an empty string field I get this error to:

ClientDataSet1: Must apply updates before refreshing data.

Also on reconcile error I get this: Field 'customer.Addr2' cannot be a zero-length string
The limits of my language mean the limits of my world
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02