?
Solved

preventing to enter same data

Posted on 2003-03-01
7
Medium Priority
?
159 Views
Last Modified: 2010-04-04
i have a table(this DBF includes fields aa,ab,ac and ad) and this table is index on aa. i want to prevent to enter same data into aa field. How can i prevent entering same data.
thanks
0
Comment
Question by:mares40
[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
7 Comments
 
LVL 9

Expert Comment

by:mocarts
ID: 8049136
create unique index for field "aa"
with SQL (DDL):
create unique index my_index_name on my_table_name (my_column_names)

with Database desktop you must simply check Unique check box in index definition dialog.

wbr, mo.
0
 
LVL 3

Expert Comment

by:ILE
ID: 8049241
what u need is the unique index
in database desktop
click on restructure table forth button from the left

push the define key

simply click unique check


:))
0
 

Author Comment

by:mares40
ID: 8056799
first i append an empty record and then enter the data.
in this case i am using unique index but i can not prevent entering same data.
0
Independent Software Vendors: 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 9

Accepted Solution

by:
mocarts earned 400 total points
ID: 8056845
you want to prevent users to eneter same data at input stage or when saving to db?
saving to db can be resolved with unique index.
in input stage you must validate user input in Field's OnValidate event. (possibly with DataSet.Locate(..) method or with some SQL query)

wbr, mo.
0
 

Expert Comment

by:CleanupPing
ID: 9316996
mares40:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9999576
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: mocarts

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 10029512
Forced accept

Computer101
E-E Admin
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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