Solved

Runtime error '-2147217887(80040e21)

Posted on 2003-11-26
7
762 Views
Last Modified: 2013-12-25
Runtime error '-2147217887(80040e21)': - The changes you requested tot the table were not successful because they would create duplicate values in the index,primary key  or relationship in visual basic
0
Comment
Question by:chembukar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 
LVL 8

Expert Comment

by:MYLim
ID: 9830292
THIS IS VIOLATION OF PRIMARY KEY.
PRIMARY KEY MEANS : record should be appear one time.(unique).
0
 
LVL 8

Accepted Solution

by:
MYLim earned 125 total points
ID: 9830313
Ex:Table Employee have 2 field (Employeecode,EmployeeName)
every employee should have his own employeecode.
-Jason = EMP1000
-Jacky = EMP1001
-JACK = EMP1002

primary key will define when design database table.
0
 
LVL 8

Expert Comment

by:MYLim
ID: 9830321
Ex:Table Employee have 2 field (Employeecode,EmployeeName)
every employee should have his own employeecode.
-Jason = EMP1000
-Jacky = EMP1001
-JACK = EMP1002

database designer will define/create primary key to prevent duplicate data exist in table employee.primary key will define when create table.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:MYLim
ID: 9830331
Cut from MSDN library:
primary key
A column or combination of columns that uniquely identifies a row in a table. It cannot allow null values and must always have a unique index. A primary key is used to relate a table to foreign keys in other tables.
0
 
LVL 8

Expert Comment

by:MYLim
ID: 9841044
any more question ?
0
 
LVL 1

Expert Comment

by:ayufans
ID: 10512151
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- answered by MYLim

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

ayufans
Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question