Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> OCI and SQLT_DAT

OCI and SQLT_DAT

From: <ballgod_at_my-deja.com>
Date: Fri, 17 Sep 1999 01:19:07 GMT
Message-ID: <7rs4u3$a6t$1@nnrp1.deja.com>


I'm writing an OCI application that deals with dates and times. After executing a query using OCIStmtExecute(), I can obtain information about select-list items such as column type. If I get back SQLT_DAT for a column, then I know it holds a date/time. Fine.

But what if I want to store only the time portion, or only the date portion. How do I distinguish between these? All I know is that the column is of type SQLT_DAT. How would I store only the time, or only the date?

So after getting back SQLT_DAT for the column type, I can call OCIDefineByPos() using SQLT_DAT. But I don't know whether the data that is fetched is a time, or a date? If it is both (a timestamp), then there is no problem of course.

But with ODBC, there are types like SQL_DATE, SQL_TIME, SQL_TIMESTAMP, which makes things a whole lot easier. Is there an equivalent for OCI?

Thanks to anyone who can help! :)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Sep 16 1999 - 20:19:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US