I having the next simple code that get exception "32146 Cannot perform operation on a null date"
oracle::occi::Date dt;
dt.setDate(tt.tm_year, tt.tm_mon, tt.tm_mday, tt.tm_hour, tt.tm_min, tt.tm_sec);
The tt.tm_year, tt.tm_mon, tt.tm_mday, tt.tm_hour, tt.tm_min, tt.tm_sec values are:
tm_year=114, tt.tm_mon=1, tt.tm_mday=4, tt.tm_hour=1, tt.tm_min=2, tt.tm_sec=0
WHY do I get exception? Thanks
You have not explicitly initialised the
dtvariable so it is using the default class constructor and isNULL.Summarising the C++ Call Interface Programmer's Guide (with your variables), you need to use the class constructor to initialise it to a non-
NULLvalue: