Trying to update a table using BO; can someone tell me why this

When running Update method using temp-table ttWHATEVER, my experience has been that you have to create a "before image" of the record you are changing in the temp table. The BO expects this in order to compare which fields have changed. If you look in the appserver log you will usually see an error "*** NO xyz RECORD AVAILABLE" if this is the case. Something along those lines.

I have a little include file which does this - I call it genttBI.i (generate temp-table before-image);
Pass your tablename as parameter {1} ...

if available tt{1} then do:
def buffer Oldtt{1} for tt{1}.
/* find {1} where rowid({1}) = tt{1}.DBRowIdent no-lock no-error.
if available {1} then do: */
create Oldtt{1}.
buffer-copy tt{1} to Oldtt{1}
assign
/* tt{1}.DBRowIdent = ROWID({1})
tt{1}.rowident = string(tt{1}.DBRowIdent) */
Oldtt{1}.rowmod = ""
tt{1}.rowmod = "U".
/* end. */
end.
else message ("*** tt" + "{1}" + " Not available for before-imaging").



Cheers!

Chris Heins
Sr. Programmer/Analyst
PNY Technologies, Inc.
[Description: Description: cid:image001.jpg@01CA473E.14A061C0]
p: 973.560.5370
m: 908.256.3662
e: cheins@...<mailto:cheins@...>
w: www.pny.com<http://www.pny.com/>

_________________________________________________________________________________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.
This e-mail message from PNY Technologies, Inc. (http://www.pny.com) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


[Non-text portions of this message have been removed]