<i><font color="#663300">sorry, I can't remember the contributor</font></i>
Jeff Evoy.
<i><font color="#663300">but some time back there were some issues disussed in the Ischanged() method of cbizobj. there were some problems with :
<code>IF CURSORGETPROP("BUFFERING") = DB_BUFOPTTABLE * See IF there is a modified record anywhere in the cursor. llIsChanged = (GETNEXTMODIFIED(0) # 0)
we changed this to the following and it solved the problems: IF CURSORGETPROP("BUFFERING") = DB_BUFOPTTABLE * See IF there is a modified record anywhere in the cursor. *---------------------------------------------------------- *- 9/11/2000 JAE GETNEXTMODIFIED not working consistenty *- Implemented scan instead *- llIsChanged = (GETNEXTMODIFIED(0) # 0)</code></font></i> Do you remember what the problem was? How was GETNEXTMODIFIED() not working? Was it failing to distinguish between new, unmodified records, since the PK field had been "changed" when the record was created? If so, I could easily add code to check for such conditions that would be a lot simpler and cleaner than the example you quoted.
<i><font color="#663300">my question indirectly relates to this method: In a form I have, I am adding new records to a child using oform.obizobj.New() The records add fine and edit ok. really no problem HOWEVER the above method was generating an error. After days of searching I discovered that as each record was added, if you check the RECNO() it is a negative: -1,-2,-3 etc as the records are added. The ischanged() method then bombs out at Go lnRecno because a negative record does not exist. I have no idea whether this negative value is normal or I have done something incorrect somewhere or is this really an obscure bug.</font></i>
In a table-buffered cursor, new, uncommitted records are given negative record numbers. <code>GO -1</code> should work unless the record gets committed/reverted. <font color="#cc0000"> ___/ / __/ / ____/</font> Ed Leafe ©2001 Ed Leafe |