thdmx表里有两个float型字段sjsl和sjdw
set rs=cnn.execute("select * from thdmx where ....")
tempsl=rs.fields("sjsl")
tempdw=rs.fields("sjdw")还有两个文本框txt_sl和txt_dw
现在要用tempsl+txt_sl.text 对thdmx_sjsl 进行更新
cnn.execute("update thdmx set sjsl='tempsl+"&val(txt_sl.text)&"'  .. where...")
出错
请问这个表达该怎么写?

解决方案 »

  1.   

    我用tempsl=tempsl+val(txt_sl.text)
    cnn.execute"update thdmx set sjsl=tempsl where ..."也出错对了,上面的语句没有括号的
      

  2.   

    cnn.execute("update thdmx set sjsl="& tempsl+ val(txt_sl.text) &"  .. where...")
      

  3.   

    cnn.execute("update thdmx set sjsl='" & txt_sl.Text & "',sjdw='" & txt_dw.Text & "'  where...")
      

  4.   

    楼上的不行的.
    cnn.execute("update thdmx set sjsl="& tempsl+ cdbl(txt_sl.text) &"  .. where...")
    //当然你要保证你的文本矿输入的是数字