Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006

    Unanswered: MS SQL SERVER 2005 BUG?? Cannot insert NULL into column diagram_id

    Hi friends,

    when trying to save a diagram I got an error:
    The sp_creatediagram procedure attempted to return a status of NULL, which is not allowed.

    Whats with this????

  2. #2
    Join Date
    Dec 2006

    Error while creating db diagram

    I had the same issue an just fixed it by turning the "diagram_id" field in SysDiagrams table to "identitity".

    I dropped the table and ran the following script.

    CREATE TABLE [dbo].[sysdiagrams](
    [name] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [principal_id] [int] NOT NULL,
    [diagram_id] [int] identity(1,1),
    [version] [int] NULL,
    [definition] [varbinary](max) NULL
    ) ON [PRIMARY]

    It worked.

  3. #3
    Join Date
    Jan 2009

    Thumbs up RE: Error while creating db diagram

    Thank you it works, the only caveat is that by dropping the table all previous diagrams are lost, to avoid it, I've tried using

    ALTER table [dbo].[sysdiagrams]
    MODIFY [diagram_id] [int] identity(1,1);

    --but it did not succeed. Never mind it should be not so difficult to re-create your previous diagrams.//

  4. #4
    Join Date
    Aug 2011
    Chennai, India

    RE: Error while creating db diagram

    Instead of recreating the table. drop the column diagram_id

    ALTER table [dbo].[sysdiagrams]
    DROP COLUMN [diagram_id]

    then recreate that column again with following command

    ALTER table [dbo].[sysdiagrams]
    ADD [diagram_id] [int] NOT NULL IDENTITY (1, 1)

    This works for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts