易
易领
Unregistered / Unconfirmed
GUEST, unregistred user!
我想在edit1中输入date 如:88-6-24 把所有saledate="6/24/88"的记录在
DBGrid中列出.程序如下:
procedure TForm1.Button3Click(Sender: TObject);
begin
with query1 do
begin
close;
sql.clear;
sql.add('select itemstotal,saledate,company from customer,orders where (orders.saledate=:date)');
query1.parambyname('date').asstring:=edit1.text;
open;
end;
end;
但是点Button3返回如下错误roject Project1.exe raised exception
class edbengineerror with message 'type mismatch in expression'
为什么?还有没有其他的办法?
DBGrid中列出.程序如下:
procedure TForm1.Button3Click(Sender: TObject);
begin
with query1 do
begin
close;
sql.clear;
sql.add('select itemstotal,saledate,company from customer,orders where (orders.saledate=:date)');
query1.parambyname('date').asstring:=edit1.text;
open;
end;
end;
但是点Button3返回如下错误roject Project1.exe raised exception
class edbengineerror with message 'type mismatch in expression'
为什么?还有没有其他的办法?