Re: Inserting values into DATE datatype using OCI
Date: 1996/11/14
Message-ID: <145_at_sunray.win-uk.net>#1/1
In article <3289A901.167E_at_phya5.physik.uni-freiburg.de>, Ansgar Seiter (seiter_at_phya5.physik.uni-freiburg.de) writes:
>Puru Balakrishnan wrote:
>>
>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".
>
>You might try it.
I have used the 7 character string in Pro*c to hold dates, but only
as an Oracle internal date type, which is binary encoded and
specified in the manual. This was not using the OCI and required
you telling the pre-compiler that it was a date using the exec sql
var statement
e.g.
char mydate[7];
EXEC SQL VAR mydate IS DATE;
Be careful in using these NO validation is done on the field by Oracle and you can insert impossible dates into the database e.g. 30/02/1996
Hope this helps
Mike Received on Thu Nov 14 1996 - 00:00:00 CET