你的要查询的数据中字段是数值型的还是字符型的。 数值型的: select Count(*) as iCount from table where Field1='+edit1.text; 字符型的: select Count(*) as iCount from table where Field1='''+edit1.text+'''';
'select * from tab where filed = ' + QuotedStr(edit1.text); 要看个数就查看你使用的数据集在执行查询后的RECORDCOUNT属性。
'select * from tab where filed="'+edit1.text+'"'
数值型的:
select Count(*) as iCount from table where Field1='+edit1.text;
字符型的:
select Count(*) as iCount from table where Field1='''+edit1.text+'''';
要看个数就查看你使用的数据集在执行查询后的RECORDCOUNT属性。