WRITEing a row to an OI table (OpenInsight 32-bit Specific)
At 17 NOV 2004 08:06:59AM Jeremy Harrison wrote:
I need some insight into saving a record in OI. A brief background on the relevant parts of the application:
The main form in my application has a button on it. When the SAVE button is clicked, I check to see if there were any changes to the form – I do this by comparing the audit fields with the Audit Table entry. The audit fields update whenever the Form Data changes. If there was a change, I first update the Audit Record, and then update the Form record. (Two Tables.)
Currently, my comparison and Audit Record Update are scripted into the Click event of the SAVE button; saving the Form record is a quick event also associated with the Clcik event of the button.
This gives me control where I need it and leaves the event chain to take care of "the other stuff" – namely saving the actual data (Form) to its table, and clearing the form…
Is this efficient? I originally wanted to send a WRITE message to the Form – but gave up on that when I found the quickevent…
Is it more efficient to Send_Message(@window, "WRITE")? Is that the proper syntax for that command?
At 17 NOV 2004 09:04AM [email protected] wrote:
When the SAVE button is clicked, I check to see if there were any changes to the form – I do this by comparing the audit fields with the Audit Table entry.
You could check the SAVEWARN property here but it is possible you are checking other things too so…
Efficiency is moot on processes which are user bound like this - we're talking differences of tens of milliseconds! To abandon the save we assume you're just returning a 0 instead of a 1 from your script?
If you WISHED to script this you would SEND_EVENT(@WINDOW, "WRITE").
The Sprezzatura Group Web Site
World Leaders in all things RevSoft