how to insert datetime in PRO*C

From: Aniruddha Kortikar <kortikar_at_mipos2.intel.com>
Date: 18 Nov 92 00:53:56 GMT
Message-ID: <Bxvztx.63s_at_inews.Intel.COM>


varchar var1;
varchar var2;
varchar datetime[15];
datetime.arr contains "mm/dd/yy hh24:mi" i.e "12/30/92 15:54" datetime.len contains 14

char stmt[1000];
strcat(stmt,"insert into tablename (f1,f2,date_field) values (:v1,:v2,:v3)"); exec sql prepare s1 from :stmt
exec sql execute s1 using :var1,:var2,:datetime

ORA-01859 : a number was found in a date and a letter was expected.

How can I force oracle to consider this as datetime. in normal sql I would have done
insert into tab (f1,f2,date_field) values

                (v1,v2,to_date('char text','mm/dd/yy hh24:mi');

exec sql execute s1 using :var1,:var2,to_date(....) does not work

Aniruddha Kortikar (kortikar_at_mipos2.intel.com)


E-mail 	: kortikar_at_mipos2.intel.com | A billion here, a billion there ...
Phone(W): 408 765 5515              | pretty soon it adds upto real money.

-------------------------------------------------------------------------------
Received on Wed Nov 18 1992 - 01:53:56 CET

Original text of this message