1

When i insert data in mssql table it give an error like SQLSTATE[IMSSP]: The active result for the query contains no fields. (SQL: SET IDENTITY_INSERT TableName ON). it only happen when primary key is set.

When i remove the query SET IDENTITY_INSERT TableName ON it is perfectly work in my system, but if I setup project in another pc and the try to insert data it gives an error like Cannot insert explicit value for identity column in table 'Table_name' when IDENTITY_INSERT is set to OFF.

Thanks in advance

Pratik
  • 31
  • 1
  • 7
  • https://stackoverflow.com/questions/21441792/sql-cannot-insert-explicit-value-for-identity-column-in-table-table-when-ident/21441948 – gayatri darade Jan 09 '19 at 12:26
  • Thanks for your reply. this was really helped me. but i was remove the autoincrement column. – Pratik Jan 10 '19 at 06:54

0 Answers0