How to solve this error, i am developing billing s/w here i am using identity for bill number. But error is came how to solve this error Any one guide me.
Cannot insert explicit value for identity column in table 'bill' when IDENTITY_INSERT is set to OFF.
This is for my SQL Query
SET IDENTITY_INSERT bill ON insert into bill(staffid,cstid,cstname,schemes,counum,recnum,date,slno,proname,price,qty,protax,dis,amt)values(@staffid,@cstid,@cstname,@schemes,@counum,@recnum,@date,@slno,@proname,@price,@qty,@protax,@dis,@amt)SET IDENTITY_INSERT bill OFF
What I have tried:
Cannot insert explicit value for identity column in table 'bill' when IDENTITY_INSERT is set to OFF.