你没有post到数据库吧,或事务没有提交。

解决方案 »

  1.   

    Public Sub getconnect()
        Dim constr As String
        
        faxcn.CursorLocation = adUseClient
        faxcn.ConnectionTimeout = 10
        faxcn.Provider = "sqloledb"
        ......'得到连接
    End Sub
    ublic Sub getrecordSet()
        Dim strsql As String
        
        Form1.getconnect
        
        If faxrs.State = 1 Then
           faxrs.Close
        End If
        
        strsql = "select * from dbo.Fax"
        faxrs.Open strsql, faxcn, adOpenStatic, adLockOptimistic
        Set faxrs.ActiveConnection = Nothing
        faxcn.Close
    End Sub
    Public Sub updatedata()
        Form1.getconnect
        faxrs.ActiveConnection = faxcn
        faxrs.Update
        faxrs.updatebanch
        faxrs.ActiveConnection = Nothing
        faxcn.Close
    End Sub
    功能代码部分
        faxrs.delete
        form1.updatedata
    但是当前行的删除只能在本地有效,从新从服务器上getrecordset一下,就复原了!