转换的主机是 win7专业版
使用的主机是 win7 家庭普通版
如文件在专业版的主机上使用 没提示错误。
在 家庭普通版的主机
.NET Framework 版本:2.0.50727.5448
Foxtable 版本:2014.11.11.1
错误所在事件:窗口,空滤显示板登陆界面,AfterLoad
详细错误信息:
异常来自 HRESULT:0x8004503A
代码如下:
If Val(Format(Date.Now,"Hmm")) >= 811 And Val(Format(Date.Now,"Hmm")) <= 2015 Then
e.Form.Controls("jhrq").value = Date.Now
e.Form.Controls("jhbc").text = "日班"
Else
If Val(Format(Date.Now,"Hmm")) >= 0 And Val(Format(Date.Now,"Hmm")) < 810 Then
e.Form.Controls("jhrq").value = Date.Now.AddDays(-1)
e.Form.Controls("jhbc").text = "夜班"
Else
e.Form.Controls("jhrq").value = Date.Now()
e.Form.Controls("jhbc").text = "夜班"
End If
End If
Dim dt As DataTable = DataTables("当班计划表")
dt.DeleteFor("")
Dim str As String = e.Form.Controls("jhbc").text
Dim d As Date = e.Form.Controls("jhrq").Value
If str = "" Then
MessageBox.Show("请正确填写班次!")
Return
End If
Dim DT1 As DataTable = DataTables("生产计划表")
Dim DT2 As DataTable = DataTables("当班计划表")
Dim drs As List(Of DataRow)
drs = dt1.Select("计划日期 = #" & d & "# and 班次 = '" & str & "'" ,"序号")
If drs.Count > 0 Then
For Each dr As DataRow In drs
Dim drnew As DataRow = dt2.AddNew()
drnew("计划日期") = dr("计划日期")
drnew("班次") = dr("班次")
drnew("序号") = dr("序号")
drnew("车型") = dr("车型")
drnew("CAP") = dr("CAP")
drnew("CASE") = dr("CASE")
Next
Else
MessageBox.Show("没有该班次的生产计划,请联系生管确认!")
Return
End If
sp.Speak( Format(d,"M月d日") & "," & str & ",工作开始!", DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)
Vars("jhrq") = d
Forms("空滤显示板").Open