|Subject||RE: [IBO] Error using query with updatable view|
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Thursday, January 04, 2018 6:31 AM
Subject: [IBO] Error using query with updatable view
Hi all, and best wishes for the new year of 2018!
I use Windows FB 2.5, Delphi 2007, IBO 5.5.5 2152.
With an updatable view (2 tables joined in 1 view, using triggers to update and delete data in both tables), I create a simple TIB_Query on a data module and add select * from myview, and click Generate For Table to auto-generate update/insert/delete sql code; this works fine just as with a simple table.
However, opening this TIB_Query cause “Invalid customer DML column reference RDB$DB_KEY”. It seems Firebird SQL does not have a RDB$DB_KEY in a view, which is logical, since it refers to 2 tables.
Using a third party DB tool
"Database Workbench", I can view and edit rows without any problem, so the view
Now, how can I get this to work in IBObjects?
I did try to turn off Keylinks autodefine, no change. I did try to edit WHERE RDB$DB_KEY = :DB_KEY and substitute with the primary key column, no change. I did try to add the primary key column to KeyLinks, no change.
So, in short, is it possible to use TIB_Query for view/insert/update/delete with an updatable view?
Thanks in advance,