I am getting data into power table through SQL query from a particular table. However I want to give insert & update functionality in this power table. Update operation : User will click on any cell in power table & edit that particular cell & press enter. That entry should be updated in SQL table. Insert operation: For this, I want to give one blank row at the end of the power table where user will enter all the details & press enter. That entry should be inserted in SQL table.
Please suggest me how can we achieve this. If not then any alternative for this.
Your SQL server is throwing the exception. There must be a syntax error of some kind. Which SQL server are you using? ...and could you do me a favor and copy your query and paste it into the forum using "```" on either side of it? It will look like:
Insert into [...] values [...]
It will make it easier for me to accurately replicate the problem.
Additional note:
I typically troubleshoot problems of this nature by testing the query directly in the database. A lot of times a red squiggly line there will tell me the problem with my syntax:
I got my SQL query error. Currently, insert a row but if I enter any value in the last row then immediately open both popup insert and update. I required when I enter a new value in the last row then only open the insert popup.
and another one I face an error when I enter any value in a single row and then immediately automatically enter the same value in all rows.
I'm afraid I'm going to be offline for the next few hours, but looking at what I can see of your code, you are calling your custom method from the onCellEdited extension function and passing in the new value from a single cell. My guess is that you are attempting to insert in all four columns, but you are not getting the values from the surrounding cells using the row index. It would be something like:
Also, and this is where it would get tricky, I can imagine that you will need something in your onCellEdited call that prevents the insert if there are null values in any of the surrounding columns.
Anyway, it's an interesting problem, so I'm curious about the final result. I'll be sure to check back in on this later in the day.