Alright then you already have the solution

oStmt.executeUpdate("DELETE FROM TAB1 WHERE id1=id2)

If the FK relationship is setup to handle the delete cascade, as you say.
The real question then becomes how do you make the UI behave nicely. If you 
where using forms instead of dialogs this all gets done for you.

But you say you have a dialog box so, you might put the bookmark feature to work for you here. When the user asks to delete a record you could : freeze screen updates, save the ID, move back one record, create a bookmark, issue the delete statement with the saved ID as criteria, reload the rowset, moveto the saved bookmark, populate the dialog box with current record's data
or
     populate list box(s)
     set selected based on bookmark
un-freeze screen updates Using dialog boxes I am not sure about the freeze screen updates [LockControllers] ( have never tried this with a dialog ), and I am not sure how you are displaying the data to the user; one record at time, or as a stringlist . Either way however the basic steps would still hold firm, I think.

Wolfgang Schaible wrote:

hi Andrew,
Am Tuesday 29 August 2006 17:40 schrieb Andrew Jensen:
<first part is answered by Frank, delete with re-execute works fine>

Have tried the use the SDBC method
  oRoSe.deleteRow()
This results in "Delete privilege not available"
As for helping with a code around, let me ask you this. If you
have a rowset built as your select statement shows what do you
want to happen when you delete a row. Do you want the
corresponding rows in both tables to be deleted?
Both acc. users decison. The DB knows about foreign key, so -if wanted- records in both tables are deleted with one command.

Greetings
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to