程序执行出错信息,[microsoft][odbc sql server driver]没有执行可选特性..(100)

  • 主题发起人 主题发起人 ylqmm
  • 开始时间 开始时间
Y

ylqmm

Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下: UserSession.Querytemp.close; UserSession.Querytemp.SQL.Clear; UserSession.Querytemp.SQL.Add('update usertables set passwords = :passwords,nicheng=:nicheng,sex = :sex,email = :email,admin = :admin,'); UserSession.Querytemp.SQL.Add('howlong = :howlong,lastday = :lastday'); UserSession.Querytemp.SQL.Add(' where userid = ''' + UserSession.userid + ''''); UserSession.Querytemp.Parameters.ParamByName('passwords').Value := GY.Encrypt_text(IWEdit2.Text, UserSession.mm); UserSession.Querytemp.Parameters.ParamByName('sex').Value := IWComboBox1.Text; UserSession.Querytemp.Parameters.ParamByName('email').Value := IWEdit3.Text; UserSession.Querytemp.Parameters.ParamByName('nicheng').Value := IWEdit8.Text; UserSession.Querytemp.Parameters.ParamByName('admin').Value := GY.Encrypt_text(IWComboBox2.Text, UserSession.mm); UserSession.Querytemp.Parameters.ParamByName('howlong').Value := IWEdit4.Text; UserSession.Querytemp.Parameters.ParamByName('lastday').Value := StrTodate(IWEdit5.Text); UserSession.Querytemp.ExecSQL; end; 高手给看看是什么原因?
 
将此三句改为一句: UserSession.Querytemp.SQL.Add('update usertables set passwords = :passwords,nicheng=:nicheng,sex = :sex,email = :email,admin = :admin,'); UserSession.Querytemp.SQL.Add('howlong = :howlong,lastday = :lastday'); UserSession.Querytemp.SQL.Add(' where userid = ''' + UserSession.userid + '''');改为 UserSession.Querytemp..SQL.Add('update usertables set passwords=:passwords,nicheng=:nicheng,sex=:sex,email=:email,admin=:admin,howlong=:howlong,lastday=:lastday where userid='+'''+UserSession.userid+''');= :passwords,nicheng=:nicheng,sex = :sex,email = :email,admin = :admin,');这样试一下~~
 
后退
顶部