Código Delphi
[-]query2.close;
query2.sql.add('select fecha from ciber');
query2.sql.add(' where fecha between :Fechain and :Fechafin');
query2.parambyname('Fechain').value:=dbtext1.caption;
query2.parambyname('Fechafin').value:=dbtext1.caption;
query2.open;
a:=query2.fields[0].AsString;
query2.close;
if a <> dbtext1.caption then
begin
table2.append;
showmessage('LOS DATOS FUERON ALMACENADOS');
table2.insert;
end
else
begin
showmessage('los datos ya existen')
form3.close;
end;
gracias por la ayuda aqui esta el codigo con el que me funciono la restriccion.