Subject | TQuery -> TIBOQuery problem? |
---|---|
Author | neczusia |
Post date | 2003-08-13T07:13:38Z |
Hi,
I recently converted my application from BDE to IBO classes. But I
noticed something I can't deal with.
Previously I used TQuery -> (linked to) TDataSetProvider ->
TClientDataSet -> TDataSource. I set DSP.LogChanges = false when I was
adding some records during runtime to avoid changing data on the
server (I want to do something locally). I could append those new
records to CDS with the same ID as some already existing records (for
some purpose I need it to be displayed with the same ID). No error
occurred.
Now, when I changed TQuery to TIBOQuery it doesn't work any more. I
obtain an exception "key violation" during calling CDS->Post(). I
tried to set DSP->Constraints = false, I checked that Constraints
properties of CDS and IBOQuery are empty. I suspect, after all, that
the constraints are imported from database somehow (?). Is there any
method to append locally two (or more) records to CDS with the same
ID, when on server database ID has PK constraint?
If anyone has an idea how to force CDS not to check ID field to be
unique - please, HELP!
Regards,
Neczka.
I recently converted my application from BDE to IBO classes. But I
noticed something I can't deal with.
Previously I used TQuery -> (linked to) TDataSetProvider ->
TClientDataSet -> TDataSource. I set DSP.LogChanges = false when I was
adding some records during runtime to avoid changing data on the
server (I want to do something locally). I could append those new
records to CDS with the same ID as some already existing records (for
some purpose I need it to be displayed with the same ID). No error
occurred.
Now, when I changed TQuery to TIBOQuery it doesn't work any more. I
obtain an exception "key violation" during calling CDS->Post(). I
tried to set DSP->Constraints = false, I checked that Constraints
properties of CDS and IBOQuery are empty. I suspect, after all, that
the constraints are imported from database somehow (?). Is there any
method to append locally two (or more) records to CDS with the same
ID, when on server database ID has PK constraint?
If anyone has an idea how to force CDS not to check ID field to be
unique - please, HELP!
Regards,
Neczka.