Forms4.5 -- changing record status

From: Janice Powell <powell_at_clemson.edu>
Date: 1996/01/09
Message-ID: <4cug16$a12_at_hubcap.clemson.edu>#1/1


   First of all, thanks SO MUCH for the help I've gotten from several users concerning questions I've submitted to this NewsGroup. Your input has greatly helped!  

   I have exhausted all the resources I have in solving this problem and still can't get my form to work correctly.

   In my Form, I populate a block via a procedure rather than just issuing an EXECUTE_QUERY command. I'm running into a problem where the record associated with the block is set to INSERT rather than CHANGED no matter if data was successfully queried. It is initially set to NEW then after I populate the items, it is changed to INSERT by Forms. Thus, each time I do a COMMIT, the data is being inserted into the table.

   I added a set_record_property statement to the procedure to change the status to CHANGED rather than INSERT, but I got a FRM-40742 error. Forms4.5 Ref. Manual (Vol. 1) notes that as an illegal status change.

   So I tried to accomplish an update through another angle. I knew Forms4.5 would always try to INSERT the data in the table. So,I set a global variable in my procedure to = 'UPDATE' if data was sucessfully queried from the database. Then I created an ON-INSERT trigger that checked this global variable. If it was not = 'UPDATE', I executed an INSERT_RECORD statement; else, I executed an execute_trigger('on-update') statement. And in that trigger I executed an UPDATE_RECORD statement. I didn't get an error, but my record also did not get updated.

Has anyone ever tried to do this? If so, how did you get it to work. Also, when does Forms4.5 initally set the record status?

Please send replies to this news group and/or my e-mail address of powell_at_clemson.edu.  

Any info would be greatly appreciated.
--JP  

Janice Powell
Programmer Analyst
Clemson Univ.
Clemson, SC Received on Tue Jan 09 1996 - 00:00:00 CET

Original text of this message