Thứ Năm, 2 tháng 10, 2014

Cannot insert the value null into column 'diagram_id', table dbo.sysdiagrams

http://www.johnsoer.com/blog/?p=182

Cannot insert the value null into column ‘diagram_id’, table dbo.sysdiagrams

July 6th, 2009 | Author: Arjo Soer

When ever I copy the database from the production server to the development machine the database throws an error when updating a database diagram or creating a new database diagram. The error in question is

The solution to this problem is rather simple go to dbo.sysdiagram table and set change the diagram_id default value to 0. However when you right click to bring up the design window for the dbo.sysdiagram table the option is disabled.

Open up the columns and right click on the diagram_id column and select modify

This loads the sysdiagram design window from where you can set the default value of the diagram_id field

Save the changes and you will be able to update existing database diagrams and create new database diagrams.

Note this solution may not work for ever and has only been tested on sql server 2005.

Tags: Cannot insert the value null into column 'diagram_id', Diagram, table dbo.sysdiagrams

4 Responses to “Cannot insert the value null into column ‘diagram_id’, table dbo.sysdiagrams”

July 17, 2009 at 8:22 am

May be you need to set an autoincrement for this field?))

July 17, 2009 at 2:29 pm

I believe that is a better solution since with the current solutions once you create a second diagram it overwrites the first diagram.

  • Sudipta says:

March 30, 2012 at 3:39 pm

superb solution

August 26, 2012 at 7:18 am

Hey. Very cool web site!:0))

 




This email is free from viruses and malware because avast! Antivirus protection is active.


Không có nhận xét nào:

Đăng nhận xét

(Chơi cho vui) AIRDROP CHAINGE FINANCE - dự án xây dựng ứng dụng ngân hàng số cho mọi người

 Không hiểu lắm về cái này, tuy nhiên thấy quảng cáo khá nhiều, lại chỉ cung cấp vài thông tin cá nhân (mà mấy ông lớn như facebook với goog...