Query1.SQL.Add('...');
Query1.Open;
if Query1.RecordCount>0 then
ShowMessage('找到 '+inttostr(Query1.RecordCount)+' 个');
Query1.Open;
if Query1.RecordCount>0 then
ShowMessage('找到 '+inttostr(Query1.RecordCount)+' 个');
SQL.Add('select ecode from aaa where ecode='+Chr(39)+Edit1.text+Chr(39));
Open;
给分!
但要注意BDE连接ms sql 时有时Query1.RecordCount返回值不准。
具体的帖子请见:
http://www.csdn.net/expert/topic/96/96922.shtm
什么意思?
open;
if query1.eof and query1.bof then
“无这个员工”
else
modify it