First, make sure that the 'onEmptyValue' property for the data field which
represents Column_1 is set to 'send NULL'.

If that doesn't work, you might want to use addDynamicStrCriterion instead.
Consult your documentation for examples.

-- Grace


----- Original Message -----
From: Srinivasan Purushothaman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 07, 1999 5:07 AM
Subject: [ND] Regd Sending Null to Database - Oracle


>
>
> Hi
>         I have a situation like this
> A data object for updating
>
>           CSpUpdate dobUpdObj = (CSpUpdate)
CSpider.getDataObject("doUpdObj1");
>           dobUpdObj.clearDynamicCriteria();
>
>
dobUpdObj.addDynamicCriterion("CODE",CSpCriteriaSQLObject.EQUAL_TO_STR_OPERA
TOR,Code);
>
>
>
>
dobUpdObj.addDynamicCriterion("ID",CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATO
R,this.getDisplayFieldValue("ID"));
>
>           dobUpdObj.setValue("Column_1",new CSpString(""));
>
> I would like to set the value for column "Column_1" to NULL  VALUE in the
> database, there are other fields in dataobject "doUpdObj1" ,their values
should
> not be changed
> only Column_1 should be set to "Null" value
>
> if i use
> dobUpdImgTour.setValue("Column_1",new CSpString(""));
> (or)
> dobUpdImgTour.setValue("Column_1",new CSpNull());
>
> the generated Update statement from the Logviewer is as follows
>
> " UPDATE TABLE SET MAINT_BY = 'USER', MAINT_ON = TO_DATE('1999/06/07
> 17:47:50','YYYY/MM/DD HH24:MI:SS')  WHERE (((CODE = 'ABCD')) AND (ID =
391))"
> where the Column_1 itself does not appear.
>
> Any suggestions are welcome.The database used is Oracle.
>
> rgds
> S.Puru
>
>
> _________________________________________________________________________
>
> 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]
>

_________________________________________________________________________

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