Jim, I know it sounded confusing :
1. it didn't make no difference if the code was run from an EEP or a stored procedure. 2. Yes. Defining the code as a After Insert trigger didn't work either. 3. I didn't know that the SAVEROW doesn"'t work from within a trigger. 4. The code was invoked with a 'call StudyUID()'. Anyway, now it works. I suppose this has something to do with the way R:base works. There is also a different behaviour to enter a new row when you open a form with 'enter using' compared with ' edit using'. I made it work by inserting the code in the EEP of the button on the main form used to create a new consultation. When control gets back to this form, after the consultation was created, the code is now executed and the StudyUID is inserted in the correct row. Spent 3 evenings trying to figure it out..... ;-) Luc Delcoigne ----- Original Message ----- From: James Bentley To: RBASE-L Mailing List Sent: Monday, August 02, 2010 12:27 AM Subject: [RBASE-L] - re: can't update row Luc, I am confused what you attempted. 1. Did you define the indicated code as a stored procedure? 2. If so, did you then define this procedure as an AFTER INSERT trigger. 3. By way of information. SAVEROW is valid only in an EEP. It cannot be used in a stored procedure defined as a TRIGGER. 4. How did you invoke you code as a stored procedure? Jim Bentley American Celiac Society [email protected] tel: 1-504-737-3293 ------------------------------------------------------------------------------ From: Luc Delcoigne <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Sun, August 1, 2010 2:40:54 PM Subject: [RBASE-L] - re: can't update row as posted before I can't update a row when being in an "enter using " form. Apparently this has nothing with the code I wrote. It simply does not work. I tried to run the stored procedure as a after insert trigger, but then I get a message that a duplicate row cannot be created. So the row must already have been saved, although I can't do an update. I am a little lost here. Is this a normal R:base feature ? Luc Delcoigne

