Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: date insertion error

Re: date insertion error

From: Jan Korecki <Jan.Korecki_at_contactor.se>
Date: Mon, 24 Nov 2003 20:51:41 +0100
Message-ID: <3fc26183$0$97838$57c3e1d3@news3.bahnhof.se>

Yousaf wrote:

> Hi,
>
> I am developing an ASP VBScript app, and trying the following query via ASP
> code:
>
> INSERT INTO RISK(RISK_NO, USER_ID, DESCRIPTION, RAISED_BY, LOG_DATE, IMPACT,
> OWNER, RESOLUTION, STATUS, EXPECTED_CLOSURE_DATE, CLOSED_DATE,
> ADDITIONAL_OWNER, OTHER_OWNER)
>
> VALUES(RISK_NOSeq.nextval, 'ROCKERM' ,'dsfda','HILLJE', SYSDATE, 'H',
> 'TOWDXX', '-','O', '09-AUG-1938', '09-AUG-1938', 'N', '-')
>
> And it is throwing up the following error:
>
> Error Type:
> OraOLEDB (0x80040E14)
> ORA-01858: a non-numeric character was found where a numeric was expected
>
>
> But the strange thing is, if I run the same query in SQL Plus, it inserts a
> record without throwing any error!
>
> Could anyone shed some light on that?
>
> Thanking you in advance
>
> Regards

The first thing you do after connecting to oracle in the VB app: alter session set nls_date_format='DD-MON-YYYY';

... or whatever date format you like to have in your application as long as you use that format when you code against the database.

The nls_date_format can be set in several different places. The alter session overrides them all.

Janne Received on Mon Nov 24 2003 - 13:51:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US