"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>Look at the value of timestampStr to see if it is a valid date and time.
>You are using a cb for time and may be it is not sending the correct string.
The value of timestampStr is a valid date/time combo.
Looking at the log output of this DO insert shows the following:
..
execute insert on column: IDP=idp_seq.nextval
execute insert on column: UPGRADE_PLAN=7.9
execute insert on column: DESCRIPTION=111
execute insert on column: CREATE_DATE=sysdate
execute insert on column: LAST_MODIFIED_BY=sjohnso2
execute insert on column: LOAD_DATE=12/15/1999 00:00:00.000
execute INSERT: |INSERT INTO LOAD.IDP
( IDP, UPGRADE_PLAN, DESCRIPTION, CREATE_DATE,
LAST_MODIFIED_BY, LOAD_DATE ) VALUES ( idp_seq.nextval, ?, ?
,sysdate, ?, {ts '1999-12-15 00:00:00.000'} )|
..
Vendor message 2: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-01830: date format
picture
ends before converting entire input string.
How does ND translating "{ts '1999-12-15 00:00:00.000'}" ?
Once I know this, I can modify the Oracle parameter NLS_DATE_FORMAT
to match it.
>
>"scott johnson" <[EMAIL PROTECTED]> wrote:
>>
>>Having problems inserting a datetime value into an Oracle timestamp datatype.
>>Getting an Oracle error,
>>
>> "1830: date format picture ends before converting entire input string"
>>
>>I assumed that ND was doing the to_date conversions. Apparently, I am wrong.
>>Anyone conquered this CSpdatetime/Oracle issue?
>>
>>
>>Code example:
>>....
>>
>>CSpMultiSQL idpDO = (CSpMultiSQL) CSpider.getDataObject("idpAdmin");
>>CSpTransaction theTrans = new CSpTransaction();
>>
>>...
>>
>>String dateStr = getDisplayFieldValue("txStartDate").stringValue();
>>String timeStr = getDisplayFieldValue("cbStartTime").stringValue();
>>String timestampStr = new String(dateStr + " " + timeStr);
>>
>>CSpDatetime theTS = new CSpDatetime();
>>try
>>{theTS = new CSpDatetime(timestampStr);}
>>catch (CSpDatetimeParsingException ex)
>>
>>...
>>
>>idpDO.setValue("LOAD_IDP_LOAD_DATE", theTS);
>>
>>...
>>
>>theTrans.addDataObject (idpDO
>> ,idpDO.constructDefaultInsertDBRequest()
>> );
>>
>>command = theTrans.execute();
>
_________________________________________________________________________
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]