Last post Mar 17, 2018 07:47 PM by 4itguy
Mar 17, 2018 04:26 PM|4itguy|LINK
this is a error which i am getting when i am saving the data in db of my website which is running online.The code is working fine on localhost but giving error when running online.
i also did the SET IDENTITY INSERT ON on the table but still it gives the same error.
what should i do to remove this error.
Thanks for your help in advance.
Mar 17, 2018 07:32 PM|PatriceSc|LINK
You are using ADO.NET rather EF? The usual approach is to NOT include the identity column in your INSERT statement (as the value is generated server side there is no point in providing a value from the client side for this column).
If you need further help show maybe your SQL INSERT statement.
Not directly related but it seems you have also a problem in how the error is handled as sticlyy speaking the error is not finding a view that happens to be named with the error message for your primary problem.
Mar 17, 2018 07:47 PM|4itguy|LINK
thanks for your help.
But i just found out the mistake i did.the mistake was that i was inserting an extra column value which was not in the table(hnews)
so i provide the columns in the insert into which i wanted the value to be inserted and it removed the error.