Announcement

Collapse
No announcement yet.

Possible Coding Error: Variable not Set

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Possible Coding Error: Variable not Set

    started very recently:

    <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 18:40:45 </TD><TD class=LOGType0 align=left colSpan=3>mcsTemperature </TD><TD class=LOGEntry0 align=left colSpan=8>Trigger UI Error: on line 160 Object variable or With block variable not set</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>15/01/2006 18:40:59 </TD><TD class=LOGType1 align=left colSpan=3>Info </TD><TD class=LOGEntry1 align=left colSpan=8>HomeSeer is performing database maintenance on sample.mdb</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 18:40:59 </TD><TD class=LOGType0 align=left colSpan=3>Info </TD><TD class=LOGEntry0 align=left colSpan=8>Database maintenance Completed Successfully.</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>15/01/2006 18:40:59 </TD><TD class=LOGType1 align=left colSpan=3>Database Item </TD><TD class=LOGEntry1 align=left colSpan=8>Saving Event Heating Daily</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 18:41:08 </TD><TD class=LOGType0 align=left colSpan=3>mcsTemperature </TD><TD class=LOGEntry0 align=left colSpan=8>Trigger UI Error: on line 160 Object variable or With block variable not set</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>15/01/2006 18:41:23 </TD><TD class=LOGType1 align=left colSpan=3>Info </TD><TD class=LOGEntry1 align=left colSpan=8>HomeSeer is performing database maintenance on sample.mdb</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 18:41:24 </TD><TD class=LOGType0 align=left colSpan=3>Info </TD><TD class=LOGEntry0 align=left colSpan=8>Database maintenance Completed Successfully.</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>15/01/2006 18:41:24 </TD><TD class=LOGType1 align=left colSpan=3>Database Item </TD><TD class=LOGEntry1 align=left colSpan=8>Saving Event Hot Water Daily</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 18:41:35 </TD><TD class=LOGType0 align=left colSpan=3>mcsTemperature </TD><TD class=LOGEntry0 align=left colSpan=8>Trigger UI Error: on line 160 Object variable or With block variable not set</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>15/01/2006 18:42:03 </TD><TD class=LOGType1 align=left colSpan=3>mcsTemperature </TD><TD class=LOGEntry1 align=left colSpan=8>Trigger UI Error: on line 160 Object variable or With block variable not set</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>15/01/2006 </TD></TR></TBODY></TABLE>

    Any one else seen this?

    Simon

    #2
    This error message and similiar ones have shown up on HS2. The code sequence is below. To the best of my knowledge it should work under HS2. The hs.DeviceExistsRef returns a reference handle of a device object. A -1 returned value indicates that no device exists for the supplied device code. The hs.GetDeviceByRef returns the device object using the supplied ref.

    It appears that the referenced object is not a device object since when it is attempted to be used in line 160 it errors with an object not set message. I could check to confirm the returned item is a DeviceClass object, but I see this as a mask of a problem that will have side effects rather than a solution.

    I know there were device identification problems in HS2 builds in the early 2000's before 2038. I do not know if some residual ones still exist. I'm willing to work with the HST folks, but without their help I don't know what I can do about this.

    Code:
    120               index = hs.DeviceExistsRef(DeviceCode)
    130               If index <> -1 Then
    140                   Set dv = hs.GetDeviceByRef(index)
    150                   fs.Add vbTab
    160                   fs.Add dv.hc & dv.DC & ": " & dv.Location & " " & dv.Name
    170               End If

    Comment


      #3
      My thought is the only thing you can do is check for a valid device and issue a warning message if it fails and avoid any action that you would do if correct.


      I had some issues like that in the past; very frustrating!

      Thank you for responding so quickly.

      Simon

      Comment


        #4
        Rick responded to help desk ticket 100-6927 with the following. Are you able to repeat this problem now?

        "Can you reproduce this with 2.1.12? We put some changes in that I believe have resolved this issue."

        Comment


          #5
          am running 2.1.13 (to avoid a number of other issues, some in 2.1.12) and can confirm that at this stage I do not see any such messages.


          Suggest we treat this as closed and I will report if I get anything similar again.

          thank you for running such a good tracking system yourself!

          simon

          Comment


            #6
            Thank you for the quick feedback

            Comment

            Working...
            X