28,390
社区成员
发帖
与我相关
我的任务
分享
Dim TempSQL
Set Rst=Server.CreateObject("Adodb.Recordset")
TempSQL="Select Sn,Channel_Id,Alarm_Type,Alarm_TelGroup From T_Alarm Where Sn='"&Tmp6(1,0)&"' And Channel_Id="&Channel_Id
If Not IsArray(TempSQL) Then
Rst.Open TempSQL,Conn,1,3
Rst.AddNew
Rst("Sn")=Tmp6(1,0)
Rst("Channel_Id")=Channel_Id
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
Else
Rst.Open TempSQL,Conn,1,3
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
End If
SysMsg="报警设置成功!"
Dim TempSQL
Set Rst=Server.CreateObject("Adodb.Recordset")
TempSQL="Select Sn,Channel_Id,Alarm_Type,Alarm_TelGroup From T_Alarm Where Sn='"&Tmp6(1,0)&"' And Channel_Id="&Channel_Id
Rst.Open TempSQL,Conn,1,3
If Rst.eof Then
Rst.AddNew
Rst("Sn")=Tmp6(1,0)
Rst("Channel_Id")=Channel_Id
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
Else
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
End If
SysMsg="报警设置成功!"
Dim TempSQL
Set Rst=Server.CreateObject("Adodb.Recordset")
TempSQL="Select Sn,Channel_Id,Alarm_Type,Alarm_TelGroup From T_Alarm Where Sn='"&Tmp6(1,0)&"' And Channel_Id="&Channel_Id
set Rst=conn.execute(TempSQL)
if not Rst.eof then TempSQL=Rst.getrows '如果记录集不为空,将记录集赋给一个数组
set Rst=nothing
If Not IsArray(TempSQL) Then '判断是否数组
Rst.Open TempSQL,Conn,1,3
Rst.AddNew
Rst("Sn")=Tmp6(1,0)
Rst("Channel_Id")=Channel_Id
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
Else
Rst.Open TempSQL,Conn,1,3
Rst("Alarm_Type")=Alarm_Type
Rst("Alarm_TelGroup")=Alarm_Tel
Rst.Update()
End If
SysMsg="报警设置成功!"