Kbase P79639: Dyn: Error 7321, 7312 and 7313 when saving new rec in TV because both createPostTransValidate and p
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/05/2004 |
|
Status: Unverified
FACT(s) (Environment):
Dynamics 2.1A
SYMPTOM(s):
QUERY-PREPARE requires a valid non-null character argument for query <name>. (7321)
Saving a new record created in a Treeview
QUERY-OPEN for query <name> requires a previous QUERY-PREPARE. (7312)
Cannot run GET methods on query <name> until it is opened. (7313)
CAUSE:
The SDO of the newly created record had both createPostTransValidate and postTransactionValidate in its Data Logic Procedure. This is not allowed, for the 4 pre/begin/end/post validation slots, you can either use only the create/write/delete new api's or only the old original one (like postTransactionValidate).
Also, the postTransactionValidate was doing a RUN SUPER, which normally does not make sense, but was resulting in something (not an error as we may expect) !!! And even something rather naughty because it was calling:
bufferTransactionValidate
setLogicBuffer
createpostTransactionValidate
writepostTransactionValidate
getLogicBuffer
clearLogicRows
So both the new set and old set were run, leaving the SDO in a bad state at the postTransactionValidate point with a new record that is saved into the database (before the postTransValidate point).
FIX:
Use either createPostTransValidate xor postTransactionValidate, but never the two at the same time