此主题相关图片如下:无标题20240322.png
2024-03-22 20:31:29 --- 登录窗体>1>>>:得到【ZC_data】的数据源的设置数据:
2024-03-22 20:31:29 --- 登录窗体>2>>>:重置默认服务器IP为233:
2024-03-22 20:31:29 --- 登录窗体>88>>>:增加【ZC_data】的数据源成功:
2024-03-22 20:31:29 --- 登录窗体 >2>>>:设定【UserID】 = 3,设定【UserName】XXX,成功!!!
2024-03-22 20:31:29 --- QQClient.ServerIP = 192.168.0.233
2024-03-22 20:31:29 --- QQClient.ServerPort = 52177
2024-03-22 20:31:29 --- QQClient.UserName = 生产部.XXX
2024-03-22 20:31:29 --- QQClient.Password = htaCO0y3JkEWq9Vp05LqCw==
2024-03-22 20:31:29 --- QQClient.Ready = False
2024-03-22 20:31:37--->2024-03-22 20:31:37 --- 登录窗体>000>>>QQClient.Ready = False
2024-03-22 20:31:38--->
以上是输出的内容,以下是代码:结果是QQ登录不成功,显示文件名无效,
1、软件装D盘的英文文件夹底下,
2、同样软件,工厂20多台电脑没有问题,只有这一台有问题
3、可以正常读取到SQL数据库
4、IP和端口没错。
Dim errlog As String = vbcrlf
Dim t1 As Date = Date.Now
If QQClient.Ready Then
QQClient.Stop
Dim cmd As new
SQLCommand
cmd.ConnectionName
= "Sq_data"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~增加Zc_Data数据源~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e.Sender.Enabled = False
cmd.CommandText = "Se lect * From {Acset} Where [fid] = 1
and [Name] = '" &
e.Form.Controls("Comb账套").text & "'"
Dim vas = cmd.ExecuteValues
'MessageBox.Show(vas.Count)
If vas.Count > 0 Then
'if
sdt.DataRows.Count then
Dim cnns As String = Functions.Execute("解密", vas("Note"))
errlog &= vbcrlf & Date.Now
& " --- 登录窗体>1>>>:得到【ZC_data】的数据源的设置数据:"' & cnns
If e.Form.Controls("TxtIP").text <> "127.0.0.1" Then
If
cnns.Contains("Source") = False Then cnns &= "; Data Source = " & e.Form.Controls("TxtIP").text
errlog &= vbcrlf & Date.Now
& " --- 登录窗体>2>>>:重置默认服务器IP为233:"
End If
' MessageBox.Show(cnns)
If Connections.TryConnect(cnns) Then
If
Connections.Contains("Zc_Data") Then Connections.Delete("Zc_data")
Connections.Add("Zc_Data", cnns)
errlog &= vbcrlf & Date.Now
& " --- 登录窗体>88>>>:增加【ZC_data】的数据源成功:"
Else
MessageBox.Show("数据源设置有问题,请重新设置或与管理者联系!", "错误提示", MessageBoxButtons.OK,
MessageBoxIcon.Question)
Return
End If
Else
MessageBox.Show("账套设置有问题,请重新设置!", "错误提示", MessageBoxButtons.OK,
MessageBoxIcon.Question)
e.Form.Controls("Comb账套").Text = Nothing
e.Sender.Enabled = True
Return
End If
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If QQClient.Start() = True Then
'如果登录成功
Functions.Execute("ErrFileWrite", Date.Now & " --- 登录窗体>3start>>>QQClient.Ready =
" & QQClient.Ready)
Else '如果登录失败,显示服务器返回错误信息
Functions.Execute("ErrFileWrite", Date.Now & " --- 登录窗体>000>>>QQClient.Ready = " & QQClient.Ready)
PopMessage("QQClient登录失败,原因:" & vbcrlf & QQClient.ServerMessage, "提示", PopiconEnum.Error, 3)
e.Sender.Enabled = True
End If
Functions.Execute("ErrFileWrite", errlog)
[此贴子已经被作者于2024/3/22 20:51:42编辑过]