upsql:='update  ph  set ph='''+strtoint(edit3.Text)+''''
我的表中就一个字段ph
而且字段就一个值
可是我用上面这条sql怎么老是说不能编译STRING和INTEGER的错误
这是怎么回事

解决方案 »

  1.   

    upsql:='update  ph  set ph='+ edit3.Text
      

  2.   

    upsql:='update  ph  set ph='''+edit3.Text+''''
      

  3.   

    ph字段是integer吗?如果是应为:
           
         upsql:='update ph set ph='+strtoint(edit3.text);
       如果是string可用你的语句
      

  4.   

    upsql:='update  ph  set ph='''+ edit3.Text+''''
      

  5.   

    upsql:='update  ph  set ph='+''''+ edit3.Text+''''
      

  6.   

    不行呀
    我用strtoint就报错
    不加strtoint就不报错,可是程序也没反应
    库中什么也没变
    ph就是整形呀
      

  7.   

    如果是在Sql Server 中
    upsql:='update  ph  set ph='+ edit3.Text

    upsql:='update  ph  set ph='''+ edit3.Text + ''''
    都是可以的,不需要进行StrToInt的转换
      

  8.   

    upsql:='update  ph  set ph='+strtoint(edit3.Text);
      

  9.   

    upsql:='update  ph  set ph='+#39+trim(edit3.Text)+#39;