Author |
Topic |
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2012-01-24 : 06:10:58
|
halloI was looking for a problem in history forum..but notbefore import data insert into tabkon (id, idorg, spojeni) values (2,76567,'marcelo@gmail.com')I wrote Set Identity_insert tabkon ONa get follow msg.Cannot insert explicit value for identity column in table 'TabKon' when IDENTITY_INSERT is set to OFF.Why...I am wrote Identity_insert tabkon ONwhere is problem, please...thanks |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2012-01-24 : 06:48:31
|
Check whether you are using correct DB/Schema/ObjectSenthil Kumar C------------------------------------------------------MCITP - Database Administration SQL SERVER 2008MCTS - Database Development SQL SERVER 2008 |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-01-24 : 06:49:19
|
Set Identity_insert tabkon ONCannot insert explicit value for identity column in table 'TabKontakty'Do you see the difference?Your post isn't showing us what you are really doing... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2012-01-24 : 07:36:53
|
oh yeah !! mistakeTabKon it is |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-01-24 : 07:49:51
|
Tell us more...Which way you are using to import data?Did you try the SET command itself to see if there is an error?Are SET command and data import in different sessions?We cannot see what you are doing so please tell us more... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2012-01-24 : 07:53:34
|
quote: Originally posted by senthil_nagore Check whether you are using correct DB/Schema/Object
its the same there is no mistakei dont know what else |
 |
|
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2012-01-24 : 08:01:24
|
quote: Originally posted by webfred Tell us more...We cannot see what you are doing so please tell us more...
open sql manag.studio 1. identifies the DB (DBcompany)- click left from list DB2. click NEW QUERY3. I write:Set Identity_insert tabkon ONEXECUTEinsert into tabkon (id, idorg, spojeni) values (2,76567,'marcelo@gmail.com')EXECUTE |
 |
|
Kristen
Test
22859 Posts |
Posted - 2012-01-24 : 08:14:02
|
You still getting the same message, or is the message telling you that Identity_insert is already set on a DIFFERENT table ? (in which case you have to turn that OFF before you can turn it ON for the next table). |
 |
|
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2012-01-24 : 09:11:47
|
OK !!! it is goodKristen:I will try to turn that OFF before I can turn it ON for the next tableand it's goodbig thanks all |
 |
|
|