Strange behavior of Exchange 5.5 Event Agent

Strange behavior of Exchange 5.5 Event Agent

Post by Hollis D. Pau » Fri, 08 Dec 2000 04:00:00



This code is extracted from an Exchange5.5, SP2, Event Agent script
that creates a record in an SQL7 database when an Appointment in the
calendar folder is changed.

 'On Error Resume Next

 myMsgsColCount = omyMsgsCol.Count
 LoopFlag = 1
 For Ndex = 1 to myMsgsColCount
     Set omyMsg = omyMsgsCol.Item(Ndex)
     If omyMsg.Subject = oCurrentMsg.Subject Then            
'<<-----------------------------------<<<<<<<
     'If oSession.CompareIDs(omyMsg.ID, oCurrentMsg.ID) = True Then  
'<<-------------------<<<<<<<
  LoopFlag = 0
  Call DebugAppend("Ndex = " & Ndex, False)
  Exit For
     End if
     If Ndex = myMsgsColCount then Exit For
 Next

 if LoopFlag = 1 then
  Call DebugAppend("Error - We did not find matching message", False)
 Else
  Call DebugAppend("Success - We DID find the matching message", False)
 End if

Consider the following sequence:

1)  If I have the code as shown, which tests for a match on the subject
field, everything works fine, I get the match, the DebugAppend shows
the Success statement, and I get my record in the SQL7 database.

2)  If I comment out that line and instead use the Session object's
CompareIDs method, I get an error message in the DebugAppend and no
record appears in the SQL7 database.

3)  Now, when I change the test back to the match on the Subject field,
change the Appointment item, I get a Success message in the
DebugAppend, but TWO records in the SQL database.  The first record is
for the step 2 change, and the second record is for the step 3 change.

Anybody know why I should be getting an error message on Step 2, and
why I get the Step 2 record on successful completion of Step 3?

The debug append messages for this sequence is:

Text from end of Agent Log:

Step 1)  11/29/00 14:15:28 PubCal Stuff Appointment to SQL -
Proccessing OnChange
             Changed message with subject: <2:16 --North Creek
Rehabilitation> Fired its event
             No dummy SQL7 record.
             Ndex = 4
             Success - We DID find the matching message
             Calendar ChgMsgCl - Processing finished

Step 2)  11/29/00 14:22:02 Run time error at line 144. Source:
Microsoft VBScript runtime error Error: 800a0009.  Description:
Subscript out of range: 'omyMsgsCol.Item'

Step 3)  11/29/00 14:24:28 PubCal Stuff Appointment to SQL -
Proccessing OnChange
             Changed message with subject: <2:22 --North Creek
Rehabilitation> Fired its event
             No dummy SQL7 record.
             Ndex = 4
             Success - We DID find the matching message
             Calendar ChgMsgCl - Processing finished

There is more:  If the On Error Resume Next line is included, the step
2 hangs, with the Event Script taking 100% of the CPU and I have to
kill it with the Windows Task Manager.

 Hollis D. Paul [MVP - Outlook]


 Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195

 Mukilteo, WA  USA

 
 
 

1. Strange Exchange 5.5 SP4 behavior

Greetings,

We've been experiencing some odd behavior with a few Outlook 2000 sp2 users
in our NT Domain.  Whenever a user opens a new e-mail, deletes it, etc...
the process hangs for about 10-30 seconds (an hourglass shows) then performs
the executed task.  I noticed that the CPU performance monitor on our
Exchange 5.5 sp4 NT 4.0 sp5 server spikes then drops back to normal levels
7-20% CPU usage.  The strange thing is that I've seen a slowdown once in a
while on my setup but my experience was probably more coincidental rather
than related to what these users are experiencing.  Could they have corrupt
mailboxes?  The rest of our users (about 95% of the company) aren't
experiencing these slowdowns.  I've tried the following:

1) online maintenance
2) Server reboot
3) uninstalled 3rd party agents (Arcserve backup agent)

What baffles me is that this only happens to these users.  I've even tried
their profiles on a different computer (on a terminal server) and I still
experienced the slowdown.  Any thoughts, ideas?  Should I perform an offline
defragmentation of the pub and priv files?

cheers, and thanks in advance,

Raul

2. Offline Outbox mail gone when online

3. Strange Owa Behavior in Exchange Server 5.5

4. MS Mail Connector

5. Strange Event Sink behavior (AppointmentItem not updated on client machine)

6. Exchange RAS Connection Redial Problem

7. SMTP SSL Transport strange behavior with Exchange 2000

8. configure the security

9. Strange Exchange Behavior

10. SMTP SSL Transport strange behavior with Exchange 2000

11. Strange behavior Outlook 2002 + Exchange 2000

12. problem event scripting agent in Exchange 5.5

13. Exchange 5.5 Event Scripting Agent