I added an Oracle spatial layer to my QGIS project and added a new polygon. When saving the changes, I get an error "FROM keyword not found where expected, ... Select 0 sysdate from dual".
The error occurs if I do not insert any value for a date field in the attribute table of the new polygon. In the attribute settings of the QGIS layer the date field is set to editable=false, and no default value is set. The Oracle database date column is defined as type=DATE, nullable=YES, default=SYSDATE. QGIS probably tries to get a default value for the emtpy field, but the SQL query "Select 0 sysdate from dual" doesn´t work. Is this a bug in QGIS, or do I have to change some setting?
I found a temporary workaround for this topic: when setting the date attribut for my QGIS layer on "editable" (I don´t know how this option is called in english edition - in the german edition it is called "änderbar"), then saving the polygon works. But I do not want to allow the user to change the attribute (the empty value should be set by the database "default valuie trigger").
So does anybody know how to avoid this "select 0 sysdate" default value?