Data Population - table does not contain primary key

hey,
currently, I am facing problems using misc>> data population. I have created a database table the following way:
create table testtable(
id varchar(42) PRIMARY KEY,
name varchar(255));
Now, when I want to map the data to the database, I select the correct table, but I get an error message:
"Table 'testtable' does't contain a primary key. Unable to proceed. Reselect table(s).
I would apreciate any kind of hints. Thanks in advance.
-
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
-
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.
请先登录再写评论。
评论
2 条评论