To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=114309 Issue #|114309 Summary|NULL Boolean values being sent when NOT NULL specified | in SQL Create Table Component|Database access Version|OOo 3.2.1 Platform|Macintosh URL| OS/Version|Mac OS X Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|none Assigned to|dbaneedsconfirm Reported by|anotheralan
------- Additional comments from [email protected] Sat Sep 4 14:36:52 +0000 2010 ------- If a table is created directly from SQL with a Boolean field that is set to NOT NULL, errors arise when trying to insert new records where no changes are made to the field. (Note: there is a related bug "http://www.openoffice.org/issues/show_bug.cgi?id=114304" where DEFAULT values for booleans are not being set properly, but this addresses a case where no Default value is defined, but NOT NULL is. According to the HSQLDB docs "http://hsqldb.org/doc/guide/ch09.html#create_table-section" this should be a valid definition). Editing the table, the boolean field initially appears in an unchecked/FALSE/No state, but if no change is made to it, a NULL value is sent when attempting to create the record. This causes an error as described below. For a walkthru example: >From the Tools->SQL... Menu, run the following to create a new table with a boolean value set to NOT NULL: CREATE TABLE "testTable" ("pKey" INTEGER IDENTITY PRIMARY KEY, "testBool" BOOLEAN NOT NULL, "testText" VARCHAR(50)); Run the View->Refresh Tables option to see the update table. In the "Tables" view, double click on the "testTable" to open it directly. The "testBool" field shows up as unchecked/FALSE. Enter some text in the "testText" field and hit return or tab to add the record. An error occurs saying: Error inserting the new record Attempt to insert null into a non-nullable column: column: testBool table: testTable in statement [INSERT INTO "testTable" ("testBool", "testText") VALUES (?,?)] Toggle the testBool to checked/TRUE and then back to unchecked/FALSE and try to insert the record again and it works as expected. ----- Opening the testTable in edit mode, the GUI presents the default value for "testBool" as "No". However, this does not correspond with the behavior seen above. If the Default value in the GUI is toggled to "Yes" and then back to "No" and saved, data entry directly into the table as described above works as expected with no errors. (Note, you may have to click out of the Default value field after changing to "Yes" in order for it to be seen as a change.) --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
