Solved

Runtime error '-2147217887(80040e21)

Posted on 2003-11-26
7
744 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
  • 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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