Cannot insert explicit value for identity column in table ‘TB_NAME’ when IDENTITY_INSERT is set to OFF.

พอดี สร้าง sql ให้ลูกค้าก็ผ่าน SQL Server 2005 Express นะแหล่ะคับ แต่กลับ Insert ข้อมูลไม่ได้ ขึ้น “Cannot insert explicit value for identity column” อ่าว งง เลยดิ ไปเจอ Command ให้แก้ identity ให้ Insert ได้ ก็เลยเอามาแป่ะไว้ก่อน

ไอ้ตอน สร้าง ไหงมันไม่เปิด ON ให้เราหว่า ผู้เชี่ยวชาญถ้ามาอ่านเจอฝากตอบด้วยจ้า… ^_^

SET IDENTITY_INSERT TB_NAME ON

ที่มา http://support.microsoft.com/kb/828945

You can leave a response, or trackback from your own site. Responses are currently closed, but you can trackback from your own site. You can skip to the end and leave a response. Pinging is currently not allowed. Both comments and pings are currently closed.
Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car