Data Population - table does not contain primary key

評論

2 條評論

  • Avatar
    Lucas Drege

    Hi Philipp,

     

    Is it possible that you had first created a table without a primary key, then did all of the mappings, and added the primary key afterwards?

    If that is the case, once the table structure changes, we need to refresh the mappings.  Can you clear all of the mappings, and then re-create them?  This needs to be done as we need to grab fresh metadata from the database.  

     

    Let me know how this goes for you.

    Lucas

    0
    評論操作 永久連結
  • Avatar
    Philipp Hehnle

    I definitely have not created a table without primary key, first.

    Creating the table the following way works for me:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[testtable](

                    [Piid] [nchar](32) NOT NULL,

                    [name] [nvarchar](256) NULL

                  

    CONSTRAINT [PK_DataServicesSimple] PRIMARY KEY CLUSTERED

    (

                    [Piid] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

     

    However, I have no idea, what was wrong with my sql statement.

     

    1
    評論操作 永久連結

登入寫評論。