我用的是delphi2007里的intraweb组件,提示“修改成功”,但是数据库里没有修改??
不值是不是代码问题,我的修改代码如下:
    if IWRadioButton1.Checked=true then
 begin  UserSession.dbsquery.Close;
  UserSession.dbsquery.SQL.Clear;
  UserSession.dbsquery.SQL.Add('update DS_ReplyApplication set StuSelectTopicId:='''+IWComboBox1.Text+''',ApplyReason:='''+IWMemo1.Text+''',ApplyType:='''+IWRadioButton1.Text+''' where ReplyApplicationId='''+IWEdit1.Text+''' ');
  UserSession.dbsquery.ExecSQL;
 end;
   self.WebApplication.ShowMessage('修改成功!');

解决方案 »

  1.   

    你的"修改成功"跟你数据的修改有关系么????
    你看看你的begin end ,和你的showMessage,即使没进入if 语句也会执行showmessage语句
      

  2.   

     if   IWRadioButton1.Checked=true   then 
      begin     UserSession.dbsquery.Close; 
        UserSession.dbsquery.SQL.Clear; 
        UserSession.dbsquery.SQL.Add('update   DS_ReplyApplication   set   StuSelectTopicId:='''+IWComboBox1.Text+''',ApplyReason:='''+IWMemo1.Text+''',ApplyType:='''+IWRadioButton1.Text+'''   where   ReplyApplicationId='''+IWEdit1.Text+'''   '); 
        try
          UserSession.dbsquery.ExecSQL; 
        execpt
          self.WebApplication.ShowMessage('修改成功!');
        end;
      end; 
          
      

  3.   

            if   IWRadioButton1.Checked=true   then 
      begin     UserSession.dbsquery.Close; 
        UserSession.dbsquery.SQL.Clear; 
        UserSession.dbsquery.SQL.Add('update   DS_ReplyApplication   set   StuSelectTopicId:='''+IWComboBox1.Text+''',ApplyReason:='''+IWMemo1.Text+''',ApplyType:='''+IWRadioButton1.Text+'''   where   ReplyApplicationId='''+IWEdit1.Text+'''   '); 
        UserSession.dbsquery.ExecSQL;
          self.WebApplication.ShowMessage('修改成功!'); 
      end; 
      

  4.   

    dbsquery的写属性要设置为True才可以写入数据库的。
      

  5.   

    lowery9527说的对,那个self.WebApplication.ShowMessage('修改成功!');不管成功不成功都会执行的
      

  6.   

    ShowMessage 应该在 begin end 里面
      

  7.   

    'update       DS_ReplyApplication       set       StuSelectTopicId:='''+IWComboBox1.Text+''',ApplyReason:='''+IWMemo1.Text+''',ApplyType:='''+IWRadioButton1.Text+'''       where       ReplyApplicationId='''+IWEdit1.Text+'''' 
    请问SQL语句里面有':='这样的符号吗?    
      

  8.   

    update DS_ReplyApplication set
    StuSelectTopicId='''+IWComboBox1.Text+''',ApplyReason='''+IWMemo1.Text+''',ApplyType='''+IWRadioButton1.Text+''' where ReplyApplicationId='''+IWEdit1.Text+''   
      

  9.   

    应该是这样,才对:if   IWRadioButton1.Checked=true   then 
      begin     UserSession.dbsquery.Close; 
        UserSession.dbsquery.SQL.Clear; 
        UserSession.dbsquery.SQL.Add('update   DS_ReplyApplication   set   StuSelectTopicId ='''+IWComboBox1.Text+''',ApplyReason='''+IWMemo1.Text+''',ApplyType='''+IWRadioButton1.Text+'''   where   ReplyApplicationId='''+IWEdit1.Text+'''   '); 
        try
          UserSession.dbsquery.ExecSQL; 
        execpt
          self.WebApplication.ShowMessage('修改成功!');
        end;
      end; 
          
          
      

  10.   

    if   IWRadioButton1.Checked=true   then 
      begin     UserSession.dbsquery.Close; 
        UserSession.dbsquery.SQL.Clear; 
        UserSession.dbsquery.SQL.Add('update   DS_ReplyApplication   set   StuSelectTopicId ='''+IWComboBox1.Text+''',ApplyReason='''+IWMemo1.Text+''',ApplyType='''+IWRadioButton1.Text+'''   where   ReplyApplicationId='''+IWEdit1.Text+'''   '); 
        try
          UserSession.dbsquery.ExecSQL; 
          self.WebApplication.ShowMessage('修改成功!');
        execpt
          self.WebApplication.ShowMessage('修改失败!');
        end;
      end;
      

  11.   

    可以修改了,谢谢各位。
    是“:=”的问题,本人刚学DELPHI不太会。
      

  12.   

    這也值150?
    測試程序,最好在IDE環境下測,這樣有錯誤就可以捕捉到!
    除非,你很自信對程序異常做了很好de處理