Foxtable(狐表)用户栏目专家坐堂 → “12”f运算符后缺少操作数?


  共有1700人关注过本帖树形打印复制链接

主题:“12”f运算符后缺少操作数?

帅哥哟,离线,有人找我吗?
ycwk
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1218 积分:8451 威望:0 精华:0 注册:2016/2/2 21:52:00
“12”f运算符后缺少操作数?  发帖心情 Post By:2018/12/17 12:44:00 [只看该作者]





Dim msg As String = e.Message
'Dim ret As String = "!false"

If e.Message.StartsWith("%") AndAlso e.Message.EndsWith("%")     '假定收到的信息头尾都是"%"
    msg  = msg.Trim("%")    '去掉收到的消息中头尾的%
    Dim prefix As String = msg.SubString(0,1)
    Select Case prefix
        Case "E" '查询        'E表示紧急   emergent
            msg = msg.TrimStart("E","|")     '把开头的E和|都删除
            'msgbox(msg)
            Dim dr As DataRow = DataTables("自助报障记录表").SQLFind("_identify = '" & CInt(msg) & "'")
            If dr IsNot Nothing Then
               Dim str_content As String = "有新的报障消息到达" & dr("问题描述")  & "请" & dr("计算机中心责任人") & "注意及时处理!" 
               'Functions.Execute("BroadcastToneContent","新报障信息提示音.wav",str_content)
               Audio.play("Voice\新报障信息提示音.wav",AudioPlayMode.WaitToComplete)     '播放提示音
               sp.Speak(str_content,DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)         '异步播放 报障明细内容  不能进行其它操作   


'''''''''''''''下面代码是为了在下班时间给值班人员发送短信
            '取服务器时间
            Dim cmd As New SQLCommand
            Dim d As Date
            cmd.C
            cmd.CommandText = "Select GetDate()"
            d = cmd.ExecuteScalar()

            Dim nr As DataRow= DataTables("计算机中心交班表").Find("交班时间>" & d.AddMonths(-1) ,"交班时间 Desc")     '查找一个月以内的交班记录的第一条赋值给dr
               '如果不在周一到周五的 8点到6点  或者    5点到5点半之间  ,则还要发送短信.
            If ( (d.dayofweek =0) Or (d.dayofweek =6) Or (d.hour=14 And d.minute<=30 )  Or  (d.hour= 12) Or (d.hour=13))  Then      '如果在下班时间,则还要发送短信.           
                    '查找接班人               
                    If nr("接班人") IsNot Nothing  Then    '如果接班人不为空,发送短信
                         Dim lr As DataRow=DataTables("计算机中心人员字典").SQLFind("姓名='" & nr("接班人") & "'")    '找到计算机中心接班人的基本信息
                         Dim str_content_sms As String="有报障消息仍未处理,ID" & dr("ID") & "问题描述:" & dr("问题描述") & "报障电脑IP:" & dr("报障电脑IP") & "报障人:" & dr("报障人_姓名") & "电话:" & dr("报障人_手机")  & "请注意及时处理!"
                         Functions.Execute("智慧宜昌短信平台_手机",dr("接班人"),"计算机中心",lr("手机"),str_content_sms,"")    
                    End If  
            End If

''''''''''''''''''''''''''''给接班人发送短信代码结束




            End If                 
        'Case "U" '留着区分非紧急消息
           Case Else
     End Select 
    ' e.ReturnValue = ret     '用于向发送端返回处理后的结果,此场景下不需要
End If

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/12/17 15:07:00 [只看该作者]

Dim dr As DataRow = DataTables("自助报障记录表").SQLFind("_identify = '" & CInt(msg) & "'")

 

改成

 

Dim dr As DataRow = DataTables("自助报障记录表").SQLFind("[_identify] = " & CInt(msg) & "")

 

-------------------

 

Dim nr As DataRow= DataTables("计算机中心交班表").Find("交班时间>" & d.AddMonths(-1) ,"交班时间 Desc") 

 

改成

 

Dim nr As DataRow= DataTables("计算机中心交班表").Find("交班时间>#" & d.AddMonths(-1) & "#","交班时间 Desc") 

 

------------------------------

 

加入msgbox定位出错位置 http://www.foxtable.com/webhelp/scr/1485.htm

 


 回到顶部