TableAdapter creates a conflict.

  • Thread starter Thread starter Richard Coltrane
  • Start date Start date
R

Richard Coltrane

Hello.

I have a table in a db with autoincrement on for the PK field. The table is
empty.

I have used the wizard to create a tableadapter from that table. I create a
bunch of records and put them into the dataset and call Update on the
tableadapter and i get a constraint error. Column xyz (PK) is constrained to
be unique.

The only way this problem can occur is if the tableadapter is trying to
write over the dataset PK with that from the DB.
Ive yet to see any documentation that i have to enforceConstraints = false;
etc before updating.

Any ideas why its breaking would be appreciated.

Thanks
Richard
 

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

Back
Top