Home » Developer & Programmer » Forms » How to check table handlers correctly
How to check table handlers correctly [message #581824] Thu, 11 April 2013 02:37 Go to next message
cornwall
Messages: 36
Registered: June 2009
Member
I have a block based on a view. The view is a join on 2 tables, the first table always brings back 4 records for each parameter passed to it in the where clause. The second table is outer joined to the first table and may contain no matched records or some matched records. In some cases there will be a 1:1 match to the first table.

The problem is how to create the table handler procedure correctly. I need to update 2 tables in the table handler procedure.

The block is only enabled for update (to preserve the 4 rows), however some values on the block correspond to values from the second table. When you update a row in the block, how do you know if you are actually inserting a row into the second table or updating an already existing record on the 2nd table.

Hope this makes sense.
Re: How to check table handlers correctly [message #581826 is a reply to message #581824] Thu, 11 April 2013 02:46 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I presume that a "table handler procedure" might turn into an instead of database trigger. In there, you'd specify what to do in a case of INSERT or UPDATE.

Alternatively: have a look at ON-INSERT and ON-UPDATE form triggers (I didn't use them; prefer previously mentioned instead of trigger option).
Previous Topic: text_items are not visible in runtime
Next Topic: LIST OF COUNTRIES
Goto Forum:
  


Current Time: Fri Apr 26 14:05:02 CDT 2024