首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

delphhi

2013-04-26 
求助:delphhiprocedure Tfrmcpxg.btnokxgClick(Sender: TObject)beginif edtsrcm.Text or edtxgdj.Tex

求助:delphhi
procedure Tfrmcpxg.btnokxgClick(Sender: TObject);
begin
  if edtsrcm.Text='' or edtxgdj.Text='' or comboxgcl.Text='' then
    messagedlg('输入信息不完整!请重新输入!',mterror,[mbok],0)
   else
    begin
      adoqueryxg.Close;
      adoqueryxg.SQL.Clear;
      adoqueryxg.SQL.Add('update dishs set 菜名='+edtsrcm.Text+',单价='+strtofloat(edtxgdj.Text)+',菜类='+comboxgcl.Text+',备注='+memoxgbz.Text+'where 菜号='+edtxsch.Text);
      adoqueryxg.Open;
    end;
有错误
[Error] ucpxg.pas(70): Operator not applicable to this operand type
[Error] ucpxg.pas(70): Operator not applicable to this operand type
[Error] ucpxg.pas(76): Incompatible types: 'String' and 'Extended' delphi 编译错误 String
[解决办法]
adoqueryxg.SQL.Add('update dishs set 菜名='+QuotedStr(edtsrcm.Text)+',单价='+strtofloat(edtxgdj.Text)+',菜类='+QuotedStr(comboxgcl.Text)+',备注='+QuotedStr(memoxgbz.Text)+'where 菜号='+QuotedStr(edtxsch.Text));

热点排行