I'm trying to insert a date value in Oracle to no avail, here's an example of what I do:
* fsDoc is a foundset of table Document. Column dateDoc is type dateTime and is part of the primary key of table Document.
* pDate is a string variable containing a value in format "yyyyMMdd".
- Code: Select all
var record = fsDoc.newRecord();
record.idDoc = 6;
record.dateDoc = utils.dateFormat(pDate, "yyyyMMdd");
record.totalvalue = 100.22;
databaseManager.saveData(record);
On saveData I'm getting the following: ORA-01400 Cannot insert null into (myDatabase.Document.dateDoc)
I also tried using string data type with the following:
- Code: Select all
utils.dateFormat(utils.dateFormat(pDate, "yyyyMMdd"), "dd/MM/yyyy");
utils.dateFormat(utils.dateFormat(pDate, "yyyyMMdd"), "MM/dd/yyyy");
And get the same error. I also tried not programatically setting a value for dateDoc and setting an Auto Enter system value for the column withing Servoy... but still get the same thing.
First I thought it was an issue of date format and Ive extensively browsed online documentation and the forum looking for something similiar... but now I just don't know. Any thoughts?
Regards,
jd2p