objTStream.WriteLine strSQL & "*" & CStr(Time) 
          If sysExecSQL(strSQL) = False Then
              objTStream.WriteLine "1问题" & "*" & CStr(Time)
              objTStream.WriteLine "TOBEEEEEEE扣账记录入库失败" & Str(Time)
          End IfPublic Function sysExecSQL(ByVal strSQL As String) As Boolean
On Error GoTo ERR
DoEvents
connCCC.Execute strSQL
sysExecSQL = True
Exit Function
ERR:
sysExecSQL = False
MsgBox ERR.Description
End Function日志如下:
insert into a(a,b,c) values (1,2,3)*16:12:47
意外错:拒绝的权限*16:14:10

解决方案 »

  1.   

    objTStream.WriteLine strSeqNo & "*" & strReturn & "*" & Str(Time)
        tcpServer(Index).SendData strReturn '回送客户端信息
        DoEvents
    strSQL = "update tSequence set iListNo=iListNo+1"
    If sysExecSQL(strSQL) = False Then
        objTStream.WriteLine "流水不能自增!"
    End If
    Set objTStream = Nothing
    Set objFS = Nothing
    Set rsRecord = Nothing
    Exit Sub
    errHandler:
    objTStream.WriteLine "异常:" & ERR.Description & "*" & Str(Time)
    strSQL = "update tSequence set iListNo=iListNo+1"
    If sysExecSQL(strSQL) = False Then
        objTStream.WriteLine "流水不能自增!"
    End If
    Set rsRecord = Nothing
    Set objTStream = Nothing
    Set objFS = Nothing
    End Sub
    日志显示:
    扣账成功!*9:49:00
    00006049*TOBAAAAAAA00006049*9:49:00
    异常:拒绝的权限*9:49:02
    异常:拒绝的权限*9:49:34之后,服务器就不能正常处理客户信息了