Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI & Dates
You will have to use PRO*C
For example
EXEC SQL INSERT... For date types you use TO_DATE, for example TO_DATE('11/01/1998', 'DD/MM/YYYY') See precompilers documentation
Paul-Marc
John Fisher a écrit dans le message <775s85$pt3$1_at_pollux.dnai.com>...
>
>Hello,
>
>I'm writing a C program that needs to execute simple SQL INSERT statements
>on a remote Oracle database. Let me first preface by saying I haven't done
>anything like this with Oracle before. Basically my understanding is that I
>need to create an SQL statement containing a series of placeholders, such
as
>:EMP_NUM or :CURRENT_SALARY, then execute a series of OCIBindByName() calls
>to 'fill in the blanks.' So my first question is, is this the 'correct' way
>to build an INSERT statement? Secondly, if this is correct, how to I build
>and insert a date/time value, given a (struct tm *) value, and bind it into
>an associated value?
>
>Thanks,
>John
>
>
>
Received on Mon Jan 11 1999 - 04:12:33 CST
![]() |
![]() |