操纵何种数据库方法一样的
adoquery.close;
adoquery.sql.clear;
adoquery.sql.add(str);
adoquery.open;
adoquery.execute;
adoquery.recordcount
adoquery.first
adoquery.next
adoquery.close;
adoquery.sql.clear;
adoquery.sql.add(str);
adoquery.open;
adoquery.execute;
adoquery.recordcount
adoquery.first
adoquery.next
adoquery.fieldvalues['字段名']
是装了一个MYSQL for ODBC的驱动。 adoquery1.Close;
adoquery1.SQL.Add('select * from smssend where ssSendCheck=1');
adoquery1.Open;
SumSendCount:=adoquery1.RecordCount;总对我说,不提供这样的参数
用select count(*) AS ReCount from Tablename试试
try
with adoquery1 do
begin
close;
sql.clear;
sql.add('Select * from smssend where ssSendCheck=1');//如果ssSendCheck是数字型的话
open;
end;
except
//异常处理代码
如果这样不行,可以将你的SQL手工在MYSQL中执行一下,看有没有问题。如果没有的话,肯定是你的驱动有问题。
end;