Topic: query

i have 1255 entry for every entry i have number 10,11,12,....etc
i want to check every entry value from the big to low and if the condition equaled

if sqlexecute('select count(*) from Validated where name = "'+validator.Edit12.Text +'"  ')=1 then

     ShowMessage('this data already exist');

form2 on the show need  to check if the entry is exist in the second number.
if yes save button turn disabled