Solved

Runtime error '-2147217887(80040e21)

Posted on 2003-11-26
7
728 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now