ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Import Data from Excel Error: Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFF<p>Hi <a class="username" rel="akhter"> akhter</a>,</p> <p>You are inserting different columns from code and your table structure is different than your provided code.</p> <p>As per the error you are inserting values for ODID that is an identity column.</p> <p>You can turn on identity insert on the table like this so that you can specify your own identity values.</p> <pre class="brush: sql">SET IDENTITY_INSERT OrderDetail ON; GO -- Your Insert query. SET IDENTITY_INSERT OrderDetail OFF; GO</pre> <p>&nbsp;</p>, 25 Jul 2019 00:39:09 GMT