Append to MS SQL 2005 table

M

MChrist

I'm getting a key violation error whenever I try and append records from a
table in Access to a table on a MS SQL 2005 database. The SQL db's table has
an IID field which is the primary key for the table (and the only indexed
field in the table) and I am NOT trying to append records to the IID field
with my INSERT INTO tImport(...) statement. It is a clustered index if that
makes any difference.

Since I can't seem to add the table and write to it without an index field,
does anyone have any ideas why I am getting the error message
 
D

Duane Hookom

Is the IID field an Identity/Autonumber type? If not, you will need to
generate some value that is unique for each of the records you want to append.
 
M

MChrist

Duane,

As always, thanks for your response and your assistance.

In the many iterations before posting my question, I must of removed the
IDENTITY statement from my CREATE TABLE SQL.

Oops. Thanks again for your response.

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top