>I can't find out how to solve the following situation in a good way:
>I place a tabular dw on the screen where the user enters several lines of data. For update he presses an OK-button and
>the rows should be inserted into a table in the database. This table has a foreign key!! Some of the lines he has entered do
>not pass the foreign key check made by the database so the Update-function fails! Now I want to flag the invalid values
>by turning them into red, but I can't find a way to detect which line(s) in the dw that caused the SQL-error.
>The only way I can think of is to do an embedded SQL-test for each line before making the dw Update(), but I don't like
>that solution (performance?). I hope there is a better way!!
>Any hints of solutions would be interesting!!
>Claes Wedin, PRIMO System AB, Sweden
You can use the datawindow function GETUPDATESTATUS() to find the row
that caused the error when Update failed.
Hope this helps