求助:delphhi

来源:互联网  时间:2016/8/4 22:18:15

关于网友提出的“ 求助:delphhi”问题疑问,本网通过在网上对“ 求助:delphhi”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: 求助:delphhi
描述:

delphi编译错误String

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'
解决方案1:

adoqueryxg.SQL.Add('update dishs set 菜名='+QuotedStr(edtsrcm.Text)+',单价='+strtofloat(edtxgdj.Text)+',菜类='+QuotedStr(comboxgcl.Text)+',备注='+QuotedStr(memoxgbz.Text)+'where 菜号='+QuotedStr(edtxsch.Text));

上一篇mysql + unidac 将a表服务器复制到b表客户端)
下一篇delphi 有一个模块代码出错
明星图片
相关文章
《 求助:delphhi》由码蚁之家搜集整理于网络,
联系邮箱:mxgf168#qq.com(#改为@)