Oracle Error when clearing date field

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
martijn_v
Posts: 15
Joined: Tue Jul 20, 2010 12:26 pm

Oracle Error when clearing date field

Post by martijn_v »

Hello,

I'm using an Oracle Datasource via ODBC (Oracle 11g ODBC Driver).

When I clear (deleted the contents) of a date field in OpenOffice base, I get an Oracle Error: [Oracle][ODBC][Ora]ORA-00932: inconsistent datatypes: expecte NUMBER got BINARY. This happens both when I clear the field in a form, or directly in the table (within OO).

Anyone an idea how to solve this? I can create a button to clear the date using an SQL statement, but users could still clear the field manually which would produce this error.

Thanks in advance for any help.

Regards,

Martijn
OpenOffice 3.2 on Windows XP and Ubuntu 10.04
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Oracle Error when clearing date field

Post by eremmel »

How you clear the date field with a SQL statement? When you are setting the field to NULL value, you might check the field settings on the form and the field definition in BASE (open the table for edit) and check for NULL handling.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
martijn_v
Posts: 15
Joined: Tue Jul 20, 2010 12:26 pm

Re: Oracle Error when clearing date field

Post by martijn_v »

eremmel wrote:How you clear the date field with a SQL statement? When you are setting the field to NULL value, you might check the field settings on the form and the field definition in BASE (open the table for edit) and check for NULL handling.
When I clear it using SQL the error doesn't occur. The problem exists when it's cleared by selecting the contents and deleting them, or using the None option in the Date dropdown. It seems when I do this, the value doesn't become NULL but something binary.

By the way: there's no option regarding NULL handling when editing the table in Base (all options are greyed-our anyway, probably because it's an external database).

I'm currently trying to write a macro which intercepts the date field when it's been cleared, enters a temporary date saves the record and then clears the date using SQL. If I can get this to work, it might be a solution. But the fact that it's needed is annoying.
OpenOffice 3.2 on Windows XP and Ubuntu 10.04
Post Reply