I am using setValue() to update some fields during an executeUpdate (within a 
CSpTransaction).  The table is a udb table.  The setValue() method does not let 
me set the value of the key field of the table.  I can't find this documented anywhere.

Is there something I am missing for a key field?

The code:
try {
  trans = new CSpTransaction(); //new transaction
  CSpMultiSQL doCPRNTQUpdate  = (CSpMultiSQL) 
CSpider.getDataObject("doCPRPrintQueueList");
  trans.addDataObject (doCPRNTQUpdate);

  if (trans.begin("dsCorr")) {
    doCPRNTQUpdate.clearAllValues();
    doCPRNTQUpdate.clearDynamicCriteria();
    doCPRNTQUpdate.addDynamicCriterion 
        ("dfCprPrntqCd",
         CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR,
         cspiCprPrntqCd ); 
    doCPRNTQUpdate.setValue("dfCprPrntqCd",cspiNewPrntqCd); 
    doCPRNTQUpdate.setValue("dfCprPriorityCd",cspiCprPriorityCd); 
    doCPRNTQUpdate.setValue("dfCprUpdUserID",new CSpString(strUpdUserid));
    doCPRNTQUpdate.setValue("dfCprUpdDt",new CSpString(strUpdDt)); 
    trans.executeUpdate (doCPRNTQUpdate);
  }
  ...
} catch (Exception ex) {
 ...
} finally {
 ...//rollback, commit, etc.
}

The log:
execute update on table: |DB2T.CPRNTQ|
execute update with where clause: |(DB2T.CPRNTQ.CPR_PRNTQ_CD = 17)|
execute update on column: CPR_PRIORITY_CD=16
execute update on column: CPR_UPD_USERID=SHRDVB
execute update on column: CPR_UPD_DT=07/28/1999 00:00:00.000
execute UPDATE: |UPDATE DB2T.CPRNTQ SET CPR_PRIORITY_CD = 16, CPR_UPD_USERID = 
'SHRDVB', CPR_UPD_DT = {d '1999-07-28'}  WHERE (DB2T.CPRNTQ.CPR_PRNTQ_CD = 17)|
fetching result table using MemoryTable method
terminateRequest:Enter terminateRequest on thread 315
46da30 terminateRequest:In a transaction dont release 46e3b0
releaseDbInterface: client 933193844609 is is in a transaction
clientAuthorized: incoming client ticket and stored session ticket are valid, 
proceeding with comparison
getDbInterface:client 933193844609 has a bound dbInterface 

-Dave Bartolotta
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to