datatables Cannot retrieve inserted id - no primary key was found.
datatables Cannot retrieve inserted id - no primary key was found.
I have an auto increment Id field in my SQL Server table. When I am trying to insert new rows from dataTable I am getting this error. I noticed it is just when the table belong to a different schema than dbo. Is there any solution for this?
Thanks,
Wilson
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think your other thread also covers this. I suspect it is a schema issue I'm afraid. The Editor SQL currently uses some "cunning" (i.e. fragile) code to try and workout what field the primary key is in for the insert. I've got a better idea for that that I need to experiment with a bit.
Allan
Finally I removed the schema in my current project, but it would be great to allow using schemas.
Thanks,
Wilson