Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Runtime error '-2147217887(80040e21)

Posted on 2003-11-26
7
Medium Priority
?
811 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 500 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
Technology Partners: 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

721 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