I am experimenting with the editable table goodie and I get an error when trying to insert a row. I am using MSSQL.
[quote]Gateway Error 301:
SQL error for “INSERT INTO Panels (PanelIndex) Values (NULL)”: Cannot insert explicit value for identity column in table ‘Panels’ when IDENTITY_INSERT is set to OFF.
For Query:INSERT INTO Panels (PanelIndex) VALUES (NULL)[/quote]
I was doing some reading and from what I understand this issue is from the differences between MySQL and MSSQL. Can you confirm or correct my statement? Either way I am not sure what would be the best solution. I have never tried to insert a blank row before. Usually I always have values.
Thanks,
The add row button code is trying to insert a row by inserting a null to the primary key. Since MSSQL does not like this I changed it to insert a null value to a different field. This seems to be working OK.
[code]table = event.source.parent.TableName
This insert logic inserts a record by assigning a Null to the ‘Line’ field.
Glad you figured out how to get it working. That is why that component is distributed as a goodie rather than built-in: it isn’t all that tolerant of different databases and may need further configuration on the designer’s part. Thanks for sharing your solution.