| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> SYSDATE truncated (OCI Problem?)
Hi!
I've got a problem with an UPDATE statement called from OCI:
#define ORA_MOD "UPDATE turn SET been_there = DECODE(:1, 0, NULL,
SYSDATE) WHERE login = :2"
/* [snip] */
oopen(&cda_mod, &lda, 0, -1, -1, 0, -1);
oparse(&cda_mod, ORA_MOD, -1, 0, 2) != 0);
obndrn(&cda_mod, 1,(text*)&been_there, sizeof(been_there), SQLT_INT, -1,
0, 0, -1, -1);
obndrn(&cda_mod, 2,(text*)login, sizeof(login), SQLT_STR, -1, 0, 0, -1,
-1);
been_there = 1;
oexec(&cda_mod);
ocom(&lda);
/* [snip] */
When executed, this statement updates the been_there DATE column of the
turn table to
SYSDATE (when been_there != 0). However, the resulting value is
truncated to the
beginning of the day.
When i run the above statement in SQL*plus it works just fine.
Platform:
HP-UX
Environment (among others):
NLS_LANG=american_america.we8iso8859p1
ORACLE_SID=oradb6
ORA_NLS32=/oracle_sw/donald/oracle732/ocommon/nls/admin/data
Database:
Oracle7 Server Release 7.3.2.3.0
What am I missing? An ALTER SESSION SET NLS_XXX or something like that?
Any hints would be greatly apreciated!
Regards Thomas Broquist Received on Fri Dec 04 1998 - 02:38:19 CST
![]() |
![]() |