Using a view
Using a view
mbrennand
Posts: 34Questions: 4Answers: 0
I am trying to update a view, but receiving this....
{"error":"SQLSTATE[HY000]: General error: 1288 The target table course_descriptors of the UPDATE is not updatable","data":[]}
This discussion has been closed.
Answers
It sounds like there might be a permissions error or possibly
course_descriptors
might be a VIEW. Is either correct?Thanks,
Allan
Yes course_descriptors is a VIEW. Do these not work?
Sorry no - not at this time. As the database error is saying, with that setup the view can't be updated. My understanding is that some of the latest versions of SQL Server allow views to be updatable, but it isn't something I have experimented yet with myself.
I don't believe this is a limitation with the Editor libraries, but rather with the database itself. If you can do an
UPDATE
on the view in raw SQL, then it would probably work with the Editor libraries as well.Allan
Ok, thank you for the response.
Could I produce this in the editor?
I'm sorry to say that the Editor libraries currently doesn't support SQL functions. However, what you could do is use your VIEW for the data fetch to display in the table (i.e. DataTables' own
ajax
request) but use the Editor libraries to update the source SQL table directly (assuming that you are only modifying data that is static - i.e. not passing through an SQL method).Allan