这个程序怎么做?运行出问题!请教高手!

liutjedu 2003-06-26 04:15:30
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.Text='' then
ShowMessage('No Input')
else
begin
Query1.SQL.Clear;
Query1.SQL.Add('select CustNo,Company,City,State from customer.db');
Query1.SQL.Add('where country=(:countryName)');
Query1.Params[0].AsString:=Edit1.Text;
Query1.ExecSQL;
Query1.Active:=True;
Edit1.Text:='';
end
end.


[Error] Unit1.pas(45): ';' expected but '.' found
[Error] Unit1.pas(47): Declaration expected but end of file found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
...全文
19 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
liutjedu 2003-06-26
  • 打赏
  • 举报
回复
搞定了!谢谢各位!谢谢啊!可是分太少了!一个人少来点不要建议哦!
DWGZ 2003-06-26
  • 打赏
  • 举报
回复
哈哈,一般
[Error] Unit1.pas(45): ';' expected but '.' found
[Error] Unit1.pas(47): Declaration expected but end of file found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
都是逗号惹的祸
问题mrfanghansheng(☆☆☆木鱼☆☆☆) 已经说了我就不多此一举
lovelymelon 2003-06-26
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.Text='' then
ShowMessage('No Input')
else
begin
Query1.SQL.Clear;
Query1.SQL.Add('select CustNo,Company,City,State from customer.db');
Query1.SQL.Add('where country=(:countryName)');
Query1.Params[0].AsString:=Edit1.Text;
Query1.ExecSQL;
Query1.Active:=True;
Edit1.Text:='';
end
end.——————————end;
liutjedu 2003-06-26
  • 打赏
  • 举报
回复
大哥,一样搞不定啊!怎么回事情啊!
WWWWA 2003-06-26
  • 打赏
  • 举报
回复
这段代码没问题,我已测试过,查一下其它动方
liutjedu 2003-06-26
  • 打赏
  • 举报
回复
有人在吗?谢谢大家!
mrfanghansheng 2003-06-26
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.Text='' then
ShowMessage('No Input')
else
begin
Query1.SQL.Clear;
Query1.SQL.Add('select CustNo,Company,City,State from customer.db');
Query1.SQL.Add('where country=(:countryName)');
Query1.Params[0].AsString:=Edit1.Text;
Query1.ExecSQL;
Query1.Active:=True;
Edit1.Text:='';
end;<----这个分号老兄搞没了
end.

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧