在库内查找就是,如有则返回真!
if adotable1.Locate('字段名',查找条件,[locaseinsensitive,lopartialkey])=true then
begin
application.MessageBox('编号重复 ,请再输入!','提示',mb_IconInformation+mb_ok);
maskedit1.SetFocus;
exit;
end;
adotable1.Close;
if adotable1.Locate('字段名',查找条件,[locaseinsensitive,lopartialkey])=true then
begin
application.MessageBox('编号重复 ,请再输入!','提示',mb_IconInformation+mb_ok);
maskedit1.SetFocus;
exit;
end;
adotable1.Close;
解决方案 »
- 共享数据库,同步读取数据的问题(难啊。。。。。。。。)
- 请教大家一个关于tPieSeries的问题?
- 请教如何设置IIS6.0能使Delphi 编制的CGI程序能正确访问!
- 有用]rm2.6开发的吗?我觉得rm2.6 bug特别多!
- 在FastReport中如何用程序来调整上下,左右边距?(在线等,急急!)
- 触发器与存储过程?
- 关于MDICHILD窗口的小问题,请各位大侠帮帮吗,急
- DEPHI使用ZeroMemory提示错误Access violation ...
- 如何用Delphi实现skin技术
- 请问各位高手,如何改变状态栏中的小图标?比如把某个图标改成自己定的?
- 哪里能够找到rxdbctrl.dcu
- 能否写一个通用的函数,参数是各类控件,而内部却可以调用各类控件的方法和属性
呵呵, sailhzr(sailhzr)已经说了。
sql.clear;
sql.add('select count(*) from 表名 where 条件');
open
if fields[0].value>0 then ...重复字段的处理
else ...
Close
end;
===
没有post之前是没有问题的