This topic is locked

Duplicate records

11/17/2009 10:49:51 AM
ASPRunnerPro General questions
P
PaulMAO author

I have a table that has 10 fields. We are trying to prevent dublicates, but each of the fields can be duplicated at one time or another.

Is there a way that we can select say 5 fields and have it check to see if the information exists, if they do then prompt the user to confirm information is correct before adding. Thx

C
clig 11/18/2009



I have a table that has 10 fields. We are trying to prevent dublicates, but each of the fields can be duplicated at one time or another.

Is there a way that we can select say 5 fields and have it check to see if the information exists, if they do then prompt the user to confirm information is correct before adding. Thx


you can create unique constraints in sql server
for access or something you might have to pull values into an array or something and do a compare on load and before edit within asprunner...

J
Jane 11/19/2009

Paul,
use Before record added event and Check is specific record exists action on the Events tab for this purpose.

P
PaulMAO author 11/23/2009



Paul,
use Before record added event and Check is specific record exists action on the Events tab for this purpose.



Thanks Jane, But how do I get it to check 4 columns?

Sergey Kornilov admin 11/23/2009

Exactly the same way.

Select * from table where field1='value1' and field2='value2' and field3='value3' and field3='value3'