Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am testing my VB.NET database utility by entering the same basic information for name, address, and such into an Access database.

 

This SHOULD NOT be a problem, because my database's indexed fields are all set to "No" (except for the ID = Primary Key). Still, when I execute "Command1.ExecuteNonQuery()", I get this Exception thrown:

 

"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

 

How are my database fields set incorrectly?

 

I would like to change the indexed properties on some of these fields to "Yes (Duplicates OK)", but right now I can't even get "No" duplicates to work! Aaaaagh!

Posted

is your ID defined as autonumber?

 

If everything goes wrong for you, you can post your mdb file and I will take a look at it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...