473,413 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Key Violation(Urgenlty)

Morning Programmers


I have given project where there is corrupt database in the form of text file , what they need is paradox Boland c++ database that will handle the duplicates of student no and make it primary key on the student table. What i have done so far i was able to extract student no from the file but when i save to my field student_No(Primary Key), Error message pop up Key Violation.

My Question

How can avoid key Violation because i know it causes by same record that must be unique to its field.?

Thanks in Advanced
Nov 3 '08 #1
1 1494
ashitpro
542 Expert 512MB
If it is going to be used as primary key then you must first check whether that student number already present in table.
Or you can put the things in try catch block and simply bypass the "key violation" exception.

Regards,
Ash
Nov 3 '08 #2

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.