ODBC INSERT with parameter markers and TO_DATE

From: Guy Rouillier <guyr_at_raleigh.ibm.com>
Date: 1998/02/25
Message-ID: <6d1lmv$1pqi$1_at_rtpnews.raleigh.ibm.com>#1/1


I'm trying to INSERT a date column in an ODBC program using a prepared statement. I need to specify the incoming date format as it is not Oracle's default. Specificly, I have something like

insert into t1 values (TO_DATE(?, 'YYYYMMDD')

When I execute this statement, Oracle returns the following error:

State: 22008 Message: [Oracle][ODBC Oracle Driver]Invalid date, time or timestamp value.

What do I have to do to get in a date that is not in Oracle's format? Thanks. Received on Wed Feb 25 1998 - 00:00:00 CET

Original text of this message