There was a situation wherein I was manually generating place holder entries in a given table for internal use. It was a similar statment as below, inside a scan loop based on the child BO in which the code was executed.
Here the first record would save and the second record generated in the scan loop would fail (I remebered changing select areas as required). I was suggested on the forum here to use tableupdate() and the problem was solved. Please advise
Now I find an old code where I had used flush on a UT suggestion and had forgotten about it, so when I saw it I wanted to ask it on the forum. Thanks for the reply.
<i><font color="#663300"><i><font color="#663300">I have the following code, there is a FLUSH after the call to save. Sould I use FLUSH whenever I do a save manually or should I use TableUpdate()</font></i>
First off, TABLEUPDATE() and FLUSH() are data-layer commands. They have no business in either the bizobj or the form code.
Second, if you take the time to step through the Save() method, you'll see that the data behavior object will actually call TABLEUPDATE(), as this is the only way to save a view's changed data. FLUSH() is largely useless, as there is so much cacheing (Fox -> OS -> network -> server -> server's disk) that flushing the data from Fox to the OS doesn't really accomplish too much. And since a TABLEUPDATE() sends a command to the server, FLUSH() doesn't affect the results of the Save() at all. </font></i>
Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |