那你在你的bitbnt内的代码中把close;这句去掉啊
解决方案 »
- delphi中如何使用OpenGL导入3ds模型
- Raize控件包中的RzToolButton组件是干什么的啊~
- 一个IdUDPServer和IdUDPClient使用的简单问题,在线等,急
- 请问如和返回一个表的最后一条记录
- 怎么获得另外一个应用程Label的控件的Caption??实在是搞不定哒,请求高手帮忙。
- 我是刚学Delphi的,遇到一个问题,请帮忙相告!
- 谁知道哪里有用友财务软件的下载(在线等待)
- 不用SQL如何进行数据查找、如何得到网页源码?(限制条件)
- checklistbox1.Cursor:=crdrag为什么不行?
- 关于注册表
- 在打印很多的内容时,我如何按某个键来停止打印,比如ESC键?谢谢!
- 怎样获取c/s结构中服务器的系统时间??
BitBnt.Kind := bkCustom;
BitBnt.ModalResult := mrNone;
kind属性改成什么呢?这是代码
procedure Tgetmoney.BitBtn2Click(Sender: TObject);
var
goodsid,goodsname:string;
var
number:integer;
var
lingshoujia:currency;
begin
with gouwuquery do
begin
gouwuquery.close;
sql.clear;
SQL.Add('select 商品ID, 商品名, 零售价');
sql.add('from vgoodsinfo.db where 商品ID=:var1');
params[0].Asstring:=edit1.text;
try
open;
if gouwuquery.RecordCount=1 then
begin
goodsid:=gouwuQuery.FieldByName('商品ID').Value;
goodsname:=gouwuQuery.FieldByName('商品名').Value;
lingshoujia:=gouwuQuery.FieldByName('零售价').Value;
edit3.Text:=goodsid ;
number:=strtoint(edit2.Text);
sum:=sum+number*lingshoujia; end;
except
Application.MessageBox('连接数据库失败','系统提示',mb_ok);
Application.Terminate;
end;
with gouwutable do
begin
gouwutable.Append;
gouwutable.FieldValues['商品ID']:=goodsid;
gouwutable.FieldValues['商品名']:=goodsname;
gouwutable.FieldValues['零售价']:=lingshoujia;
gouwutable.FieldValues['数量']:=number;
end;end;
if gouwuquery.RecordCount=0 then
begin Application.MessageBox('商品ID有误','系统提示',mb_ok); Edit1.SetFocus;
exit;
end; end;
问题解决了,谢谢大家。
结贴。