Re: Inserting values into DATE datatype using OCI
Date: 1996/11/13
Message-ID: <3289A901.167E_at_phya5.physik.uni-freiburg.de>#1/1
Puru Balakrishnan wrote:
You might try it.
>
I'm not quit sure, whether this helps you or whether I gto the cause of
your problem, but I think in PRO*C Code you should represent a date
dummy as char of length 7 an try to insert "11dec96".
Ansgar
> Hello,
>
> I am having problems while inserting data into date datatype using OCI.
> The sequence of steps are:
>
> a) SQL Statement:
> insert into datetime_table( intfld, datefld) values (?,?)
>
> b) parse the SQL Statement by using oparse()
>
> c) Bind placeholders using obndrv() function
> The values supplied to the program variable are:
> For integer field - 999
> For date field - TO_DATE('11-12-1996','MM-DD-YYYY')
> The datatypes for both of the above variables is set to VARCHAR2
>
> d) Execute the SQL Statement using oexec() function
>
> After (d), Oracle displays an error message "ORA-1858, a non-numeric
> character found where a digit was expected".
>
> I would like to know if this is the correct way to insert values into a
> date
> datatype or is there a better way to do this.
>
> Thanks for any help/suggestions.
>
> Puru Balakrishnan
> Symantec Corporation
Received on Wed Nov 13 1996 - 00:00:00 CET