Re: Database actions - how to implement conditions?

2003-10-31 Thread Christian Haul
Jan Wielgus wrote:
Hello,

I'm using DatabaseDeleteAction to delete rows from a table. But
before the row is deleted I would like to check it for a condition
(in this special case if the primary key of that row is not anymore
referenced in other tables - if it would be, than it can't be
deleted). How can I put this "checking" before the actual
"delete"-action will be executed? 
I'm using a form for choosing the item to be deleted:
They are not meant to do this. One way could be to use the *QueryAction 
which allows arbitrary SQL. However, the best solution would be IMHO to 
make this a foreign key relationship guarded by the DBMS and chose a 
different pipeline if the action fails to delete the row.

	Chris.

--
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Database actions - how to implement conditions?

2003-10-31 Thread Steve Schwarz
Jan
How about using a DatabaseSelectAction first? If you condition is met then 
don't do the delete.
pseudo-pipeline:



 
 
 





Unless maybe I'm not understanding your question(?)
HTH
Steve


From: Jan Wielgus <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Database actions - how to implement conditions?
Date: Fri, 31 Oct 2003 17:23:17 +0100
Hello,

I'm using DatabaseDeleteAction to delete rows from a table. But
before the row is deleted I would like to check it for a condition
(in this special case if the primary key of that row is not anymore
referenced in other tables - if it would be, than it can't be
deleted). How can I put this "checking" before the actual
"delete"-action will be executed?
I'm using a form for choosing the item to be deleted:


Dokumenten-Kategorien


  

  
  
 


  
  

  

  
  

  

  
Regards

Jan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up Internet 
Service.  Try it FREE for one month!   http://join.msn.com/?page=dept/dialup

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