SQL Table Editor - Unable to Insert New Row
- 9 months ago
jwagner This is a bug of sorts with versions prior to V8.2. when you created the table XFT_Division_Mapping you might have set the row number column to an Identity Column. If you are using the STE to insert the row numbers, then don't create the column as identity:
--With identity: CREATE TABLE XFT_Division_Mapping ( RowNumber int IDENTITY(1,1) NOT NULL, DivisionName varchar(255) NOT NULL, PRIMARY KEY (RowNumber) ); -Without Identity: CREATE TABLE XFT_Division_Mapping ( RowNumber int (1,1) NOT NULL, DivisionName varchar(255) NOT NULL, PRIMARY KEY (RowNumber) );
You could also try removing any reference to Row Number (or whatever column is set to IDENTITY) from the STE so that It's not trying to insert a value into the identity column.
- 9 months ago
I get around this by handling all the table inserts and updates with code in a dashboard extender. I write a method to calculate the next row Id and add it to the record(s) being inserted. Then do the insert manually as well using sql. Finally update and return the SQLTableEditorTaskResult to reflect your work in the table.