To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=80426 Issue #|80426 Summary|Request to remove read-only form control values from g |enerated INSERT statements Component|Database access Version|OOo 2.2 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|none Assigned to|dbaneedsconfirm Reported by|rosspjohnson
------- Additional comments from [EMAIL PROTECTED] Tue Aug 7 13:39:18 +0000 2007 ------- When saving a new record via a form that contains a read-only control, the generated SQL INSERT statement includes the data for read-only fields (usually a NULL value). There are two reasons this needs to change:- 1) For at least one database (PostgreSQL) this generates an error if the corresponding table column has a NOT NULL constraint, which appears to be mandatory for primary key columns. 2) It isn't necessary to include read-only control values in INSERT statements. Apart from explicitly setting the read-only property on a control, auto-increment fields appear to be set read-only implicitly. In either case, the above needs to apply. In my case, I have a read-only form control bound to a primary key (i.e. NOT NULL) table field which has an auto-incrementing default value. Because the auto-increment value is only a default value, inclusion of a NULL value in the INSERT statement generated on saving the form produces the error re assigning a NULL value violates NOT NULL constraint. I'm using an 8.x PostgreSQL server via the 0.7.2 SDBC PostgreSQL driver and OO2.2. --------------------------------------------------------------------- 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]
