日期:2014-05-19  浏览次数:20327 次

刚才按大家的方式写了一下还是报错,请再麻烦给看一下
sql.Add( 'update   tljt.dbo.f_pzdjdan   set   xs=xs+xs* '+strtofloat(edit1.Text)   where   bmmc= ' ' '+trim(combobox1.Text)+ ' ' '     and   gz= ' ' '+trim(combobox3.Text)+ ' ' ' ');

------解决方案--------------------
sql.Add( 'update tljt.dbo.f_pzdjdan set xs=xs+xs* '+strtofloat(edit1.Text) + ' where bmmc= ' ' '+trim(combobox1.Text)+ ' ' ' and gz= ' ' '+trim(combobox3.Text)+ ' ' ' ');

------解决方案--------------------
try

sql.Add( "update tljt.dbo.f_pzdjdan set xs=xs+xs* " + strtofloat(edit1.text) + " where bmmc= ' "+trim(combobox1.Text)+ " ' and gz= " '+trim(combobox3.Text)+ " ' ");

------解决方案--------------------
sql.Add( 'update tljt.dbo.f_pzdjdan set xs=xs+xs* '+strtofloat(edit1.Text) + ' where bmmc = ' ' '+ trim(combobox1.Text)+ ' ' ' and gz= ' ' ' + trim(combobox3.Text) + ' ' ' ');