Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » MSSQL new strange story :)
MSSQL new strange story :) [message #19490] Mon, 08 December 2008 11:18 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
SQL* SET IDENTITY_INSERT ORG ON
SQL* insert into ORG(ID, PARENT_ID, ORDERBY, NAME, KIND) values (0, NULL, 0, 'Company', 0)
ERROR Execute(OleDB): 23000(544): Cannot insert explicit value for identity column in table 'ORG' when IDENTITY_INSERT is set to OFF. (Microsoft SQL Server Native Client 10.0)(0): insert into ORG(ID, PARENT_ID, ORDERBY, NAME, KIND) values (0, NULL, 0, 'Company', 0)
## ERROR: Execute(OleDB): 23000(544): Cannot insert explicit value for identity column in table 'ORG' when IDENTITY_INSERT is set to OFF. (Microsoft SQL Server Native Client 10.0)
SQL* insert into ORG(ID, PARENT_ID, ORDERBY, NAME, KIND) values (1, NULL, 1, 'Company', 1)
ERROR Execute(OleDB): 23000(544): Cannot insert explicit value for identity column in table 'ORG' when IDENTITY_INSERT is set to OFF. (Microsoft SQL Server Native Client 10.0)(0): insert into ORG(ID, PARENT_ID, ORDERBY, NAME, KIND) values (1, NULL, 1, 'Company', 1)
## ERROR: Execute(OleDB): 23000(544): Cannot insert explicit value for identity column in table 'ORG' when IDENTITY_INSERT is set to OFF. (Microsoft SQL Server Native Client 10.0)
SQL* SET IDENTITY_INSERT ORG OFF


Smile Hard to say what to think...

Maybe I should get balls and sink myself deeply into those strange OleDB interfaces?

Mirek
Re: MSSQL new strange story :) [message #19491 is a reply to message #19490] Mon, 08 December 2008 11:21 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ugly workaround:

SQL.Execute("SET IDENTITY_INSERT ORG ON;insert into ORG(ID, PARENT_ID, ORDERBY, NAME, KIND) values (-1, NULL, 0, 'Company', 0)");


Mirek
Previous Topic: SQL*, SQL&, SQL*:: ???
Next Topic: problems with schema-file
Goto Forum:
  


Current Time: Mon Apr 29 04:52:22 CEST 2024

Total time taken to generate the page: 0.03662 seconds