Help with clientdataset and IBCquery

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

Help with clientdataset and IBCquery

Post by alexhaifa » Mon 30 Jun 2014 01:59

Hello,

Maybe you can help me with to understand the better way to work with these components together.

I am really having problens to configure or to go right in the configuration to work with IBCQuery + DataProvider + ClientDataset

I'd like to know what is the correct way to configure ClientDataset + Provider + IBCQuery

I have a small table with 5 fields, the first field is a primary key. I tried many things, sometimes with some configuration I have an error where the system can't find the key field, other it can update but didn't insert any new record. I tried many things and I didn't have any success.

Could you give me a small example with the steps to make this work fine?

thanks
Alexandre

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: Help with clientdataset and IBCquery

Post by PavloP » Mon 07 Jul 2014 12:38

To bind TIBCQuery with TClientDataSet, use the following code:

Code: Select all

   DataSetProvider1.DataSet := IBCQuery1;
   ClientDataSet1.ProviderName := 'DataSetProvider1';
   IBCQuery1.KeyFields := 'primary key';
To save changes on the server, call the ApplyUpdates method explicitly, e.g., as follows:

Code: Select all

  ClientDataSet1.ApplyUpdates(-1);
And try to edit/insert records. If errors occur, please provide the error messages, describe the situations when they occur (or compose a small sample to demonstrate the problem and send it to pavelp*devart*com). In addition, please specify the exact versions of Delphi and UniDAC you are using.

Post Reply