以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]最新版发布的程序部分电脑提示错误  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=142506)

--  作者:ajie5211
--  发布时间:2019/10/29 11:31:00
--  [求助]最新版发布的程序部分电脑提示错误

一直在用的程序,狐表升级到10月23日版,以前好好的,现在部分电脑会有这样的提示,点掉后,进去也可以用,是否有其它问题,目前还不清楚,但是有些电脑并不会有这样的错误提示。不知道要怎么排查问题了,以前是没有这样错误提示的。


图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:2.png
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2019/10/29 11:56:00
--  
提示很明显了呀

第一个提示启动openqq的时候没有指定ip和端口

第二个提示个人便签表afterselchanged事件有问题,检查具体代码

--  作者:ajie5211
--  发布时间:2019/10/29 13:09:00
--  
以下是引用有点蓝在2019/10/29 11:56:00的发言:
提示很明显了呀

第一个提示启动openqq的时候没有指定ip和端口

第二个提示个人便签表afterselchanged事件有问题,检查具体代码

哪为啥有的电脑不提示这个错误?比如我手上的两台电脑都不提示这个错误,但部分客户端就提示这个错误,而且这里是没有改过的代码,运行有两年了,以前都没有错误提示的啊。


--  作者:ajie5211
--  发布时间:2019/10/29 13:15:00
--  

这个错误是点确定按钮后出现的,而且只有部分客户端会出现。确定按钮的代码如下:

\'**********切换数据源************
Dim ljip As String = e.Form.Controls("txtIP").Value
Dim s As String = "Provider=SQLOLEDB.1;Password=Server2008;Persist Security Info=True;User ID=sa;" & _
"Initial Catalog=excel;Data Source=" & e.Form.Controls("txtIP").Value & "\\MSSQLSERVER," & e.Form.Controls("txtPort").Value
If Connections.TryConnect(s) = False Then
    MessageBox.Show("数据源无法连通!")
    Return
Else
    Dim cn As Connection = Connections("wjexcel")
    If cn.ConnectionString <> s Then
        If Connections.Contains("wjexcel") Then
            Connections.Delete("wjexcel")
        End If
        Connections.add("wjexcel",s)
    End If
End If
\'******加载用户,数据登记,权限表*******
Dim bn() As String = {"FtUser","tabRepData","FTtabQX","FTtabQXBt","FTcaidanQX","FTdaohangQX","FTbdkjQX","FT个人" & _
"便签","Ft自动编码规则表","Ft用到自动编码的表和列","Ft自动编码已编最大号","Ft临时编码表","流程设置表","流程进" & _
"度表","流程临时表","流程数据主表","流程数据明细"}
vars("stop") = True
For i As Integer = 0 To bn.Length - 1
    If DataTables.Contains(bn(i)) = False Then
        DataTables.Load(bn(i))
        Tables(bn(i)).Visible = False
    End If
Next
vars("stop") = False
Functions.Execute("sjbtldafzsx")
\'If DataTables.Contains("Ft自动编码规则表") = False Then
    \'DataTables.Load("Ft自动编码规则表|Ft用到自动编码的表和列|Ft自动编码已编最大号|Ft临时编码表")
    \'Tables("Ft自动编码规则表").Visible = False
    \'Tables("Ft用到自动编码的表和列").Visible = False
    \'Tables("Ft自动编码已编最大号").Visible = False
    \'Tables("Ft临时编码表").Visible = False
\'End If
\'************找到对应用户名***************
Dim UserName As String = e.Form.Controls("txtUserName").Value
Dim dr As DataRow
If UserName = ""  Then
    Messagebox.show("请输入用户!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
dr = DataTables("FtUser").SQLFind("[FtID] = \'" & UserName & "\'")
If dr Is Nothing Then
    Messagebox.show("此用户不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
If e.Form.Controls("txtPassword").Value = dr("Password") Then
    _UserFtID = UserName
    _UserName = dr("Name")
    _UserGroup = dr("Group")
    _UserSGroup = dr("上层部门")
    _DeptID = dr("DeptID")
    _OperID = dr("OperID")
Else
    Messagebox.show("密码错误!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
\'生成数据表
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "Sel  ect  OperID,{tabDepartment}.DeptID,{tabDepartment}.sName,{tabRole}.RoleID,{tabRole}.sName " & _
"Fr  om ({tabRoleOper} Inn  er J  OIN {tabDepartment} ON {tabDepartment}.[DeptID] = {tabRoleOper}.[DeptID]) Inner JOIN " & _
"{tabRole} ON {tabRole}.[RoleID] = {tabRoleOper}.[RoleID] Where OperID = " & _OperID
_URGTable = cmd.ExecuteReader()
For Each urgdr As DataRow In _URGTable.DataRows
    _UserRGroups.add(urgdr("sName") & "." & urgdr("sName1"))
    If _UserDeptIDs.Contains(urgdr("DeptID")) = False Then
        _UserDeptIDs.add(urgdr("DeptID"))
    End If
Next
\'***********登陆openQQ和系统**************
If QQClient.Ready Then
    MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
QQClient.ServerIP = e.Form.Controls("txtIP").Value  \'指定服务器IP地址
QQClient.ServerPort = e.Form.Controls("QQPort").Value  \'指定服务器端口
QQClient.UserName = _UserSGroup & "." & _UserName\'指定登录用户名
QQClient.Password = e.Form.Controls("txtPassword").Value
If QQClient.Start() = True \'如果登录成功
    Dim msg As String =  "恭喜,OpenQQ登录成功!"
    If QQClient.ServerMessage > "" Then \'如果服务器返回了欢迎信息
        msg = msg & QQClient.ServerMessage
    End If
    popMessage(msg,"提示",PopiconEnum.Infomation,2)
    e.Form.Close
Else \'如果登录失败,显示服务器返回错误信息
    PopMessage("QQClient登录失败,原因:" & vbcrlf & QQClient.ServerMessage,"提示",PopiconEnum.Error,5)
    Return
End If
\'*****************************************
\'**************系统菜单是否显示*********
Dim y As Boolean
For Each js As String In _UserRGroups
    Dim bmjs() As String = js.Split(".")
    If bmjs(1) = "《系统管理》" Or bmjs(1) = "《设计》" Then
        y = True
    End If
Next
If y = True Then
    RibbonTabs("SM").Groups("DesignFun").Visible = True
    RibbonTabs("SM").Groups("SqGn").Visible = True
    QAT.Items("Save").Visible = True
Else
    RibbonTabs("SM").Groups("DesignFun").Visible = False
    RibbonTabs("SM").Groups("SqGn").Visible = False
    QAT.Items("Save").Visible = False
End If
\'***********************************
\'************检测是否有到期工作便签*********
Dim bqdr As DataRow = DataTables("FT个人便签").SQLFind("人员ID = " & _OperID & " and 预计完成日期 <= \'" & Date.Today & "\'and 预计完成日期 <>\'\' and 结束日期 = \'\'")
If bqdr IsNot Nothing Then
    Forms("未读消息提示").Open()
    Forms("未读消息提示").Text = "有到期工作便签提醒"
    Forms("未读消息提示").Controls("来源").text = "便签"
    Forms("未读消息提示").Controls("来源").Visible = False
    Forms("未读消息提示").Controls("Label1").text = "你有已到期工作便" & vbcrlf & "  签,请及时确认!"
End If
\'**********读取硬件信息*******************
If ljip = "192.168.1.123" Then
    Functions.AsyncExecute("读取电脑硬件")
End If


--  作者:有点蓝
--  发布时间:2019/10/29 13:54:00
--  
这样改改,然后到这些电脑测试一下

\'***********登陆openQQ和系统**************
If QQClient.Ready Then
    MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
QQClient.ServerIP = e.Form.Controls("txtIP").text \'指定服务器IP地址
QQClient.ServerPort = e.Form.Controls("QQPort").text   \'指定服务器端口
msgbox("ip=" &QQClient.ServerIP  & ",port=" & QQClient.ServerPort) ‘这里会弹出什么值?
QQClient.UserName = _UserSGroup & "." & _UserName\'指定登录用户名
QQClient.Password = e.Form.Controls("txtPassword").text 
If QQClient.Start() = True \'如果登录成功

--  作者:ajie5211
--  发布时间:2019/10/29 14:15:00
--  
这样改后测试可以了,这个啥时候改特性了?而且为啥一部分行,一部分不行啊。
--  作者:有点蓝
--  发布时间:2019/10/29 14:20:00
--  
一直都这样的,可能是用户操作原因。

在不绑定列的情况下,尽量使用text属性,value属性在控件失去焦点后才会有值的

--  作者:ajie5211
--  发布时间:2019/10/30 14:27:00
--  

发现一个非常奇怪的现像,还是这个错误,用我直接发布出来的程序,打开是没有问题,不会提示的,但是,通用自动升级的方式升级上来的,这个错误还是存在的,并没有改善。是不是自动升级的打包程序出问题了?


--  作者:有点蓝
--  发布时间:2019/10/30 14:40:00
--  
可能没有升级成功。对比看看客户端程序文件的日期。

客户端测试msgbox("ip=" &QQClient.ServerIP  & ",port=" & QQClient.ServerPort) ‘这里会弹出什么值?

--  作者:有点蓝
--  发布时间:2019/10/30 14:42:00
--  
直接把最新程序复制到这台电脑测试有没有问题?不通过升级