Symptom
- Peforming bulk copy into multiple tables with an identity column and inserting an identity value manually
- If a database connection is reused, the following error is raised:
Msg 7747, Severity 16, State 1
Unable to 'SET IDENTITY_INSERT' for table 'table_name_2' because IDENTITY_INSERT or IDENTITY_UPDATE is already ON for the table 'table_name_1' in database 'dbname'.
- AseBulkCopyOptions localOpts = (AseBulkCopyOptions)((int)AseBulkCopyOptions.KeepIdentity)
Read more...
Environment
- SAP Adaptive Server Enterprise (ASE) 15.7
- SAP Adaptive Server Enterprise (ASE) 16.0
- SAP Sybase Software Developers Kit (SDK) 15.7 SP121 and higher
- Adaptive Server Enterprise ADO.NET Data Provider
Product
SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0 ; SAP Adaptive Server Enterprise SDK 16.0 ; Sybase Software Developer Kit 15.7
Keywords
SDK, identity_insert, bulkcopy, bcp , KBA , BC-SYB-SDK , SDK , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview