Apache OpenOffice (AOO) Bugzilla – Issue 37076
table data view: "Invalid cursor state" when omitting the PKEY value
Last modified: 2006-05-31 14:29:06 UTC
- for an arbitrary MySQL database, create a table with the following SQL statement(s): DROP TABLE IF EXISTS `bugdoc`; CREATE TABLE `bugdoc` ( `ID` int(11) NOT NULL default '0', `name` varchar(50) default NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; (Note that you can also create the table via the table designer, there's nothing specail about the above script) - create a database document for this database, using the MyODBC driver (I'm using version 3.51, not sure whether this matters) - open the database document - open the table by double-clicking onto it - in the first row, enter some arbitrary value into the "Name" column, and leave the row (e.g. by pressing Cursor-Down). => assertion: "No rows" => error message "Error inserting the new record. Invalid cursor state." - reload the data by pressing the respective toolbox button => several more assertions => it shows that the record in fact has been inserted, with an auto-generated ID value 0
This used to work with the very same DB/Table/Driver in OOo 1.1.x => regression.
For the records :-) ID is not an autoincrement field. If so someone could insert a second row, but that isn't possible -> error duplicate key '0'
Set this to later.
This problem is also affecting insertion of data into PostgreSQL databases through the PostgreSQL ODBC driver (latest version with PostgreSQL 8). It might be related to the old problem of inserting into a field that has a default value defined. Apparently other databases (i.e. SQL Server 2003) have this occur too. Regards and best wishes, Justin Clift
Fixed in cws dba25. Now the default value for a primary key column will be set after the a new row has been inserted. What ever sense it makes to set a default value for a primary key :-) Best regards, Ocke
Please verify. Thanks. re-open issue and reassign to msc@openoffice.org
reassign to msc@openoffice.org
reset resolution to FIXED
hi, verified in cws dba25 Bye Marc
This task is fixed in OOo 2.0, therefore I align the 'target milestone' field. => set to 'OOo 2.0'
Hi, fixed in current developer build -> close. The current developer build can be found at http://download.openoffice.org/680/index.html Feel free to reopen if this issue is not fixed in the developer build. Bye Marc