Subject RE: [IBO] Key Links and Deleting Records - Request Help
Author Helen Borrie (TeamIBO)
At 01:52 PM 28-02-02 -0600, you wrote:
>Based on your and Helen's advice, I changed my code to the following :
>
> With cdm.Shipdelete do
> begin
> If not Prepared then Prepare;
> Params[0].AsString := ContractNum.Text + '.';
> Execute;
> end;
> cdm.ShipQuery.Refresh;
>
>Now, when this code executes a second time (it's an on-exit event for a text
>box, second time is the second time you leave the box), an error message
>comes back to me :
>
>ISC ERROR CODE : 335544665
>
>ISC ERROR MESSAGE :
>VIOLATION OF PRIMARY OR UNIQUE KEY constraint "INTEG_4" on table "Shipments"
>
>
>There's some more to it, and I can post that also if needed.
>
>I'm using a generator to create my primary key, and I wonder if that's part
>of the problem?

It certainly looks as if you haven't provided enough information. I'm at a
loss to know why you are getting a key violation on a delete
operation! Well, you just wouldn't, so there is something you are not
telling us.

Also, if that manufactured key is not the primary key, then that delete
won't work, unless the manufactured key is also unique.

Tell us more...


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com