This is a discussion on ADO Record over EXOLEDB BUG REPORT during Event Registration Enabling/disabling - Microsoft Exchange ; Welcome! I've spend a couple of hours debugging this problem and I think it is bug for sure. I have written my own C++ code for Enabling/Disabling event Registration based on Microsoft Exchange SDK sample VBS project (from Project VBEventsRegistration). ...
Welcome!
I've spend a couple of hours debugging this problem and I think it is bug for sure.
I have written my own C++ code for Enabling/Disabling event Registration based
on Microsoft Exchange SDK sample VBS project (from Project VBEventsRegistration).
What surprise me if I call the Enable/Disable procedure a couple of times (one
by one) the event registration record is broken!!!
You can simulate it instantly clicking 10 times in the Enable/Disable
registration button like "10-times click" on original SDK sample Form code.
I think that "fast transactions" are not queued and procedured like real
transations should be handled by the ExOLEDB Connection object - CommitTrans().
Any next try to open this record causes error.
_com_error structure information is:
Microsoft OLE DB Provider For Exchange
Error : 0x8055001e
Description: Unexpected store error: %1!d! (0x%1!8.8x!)
The registration Record is unaccessible at all - even after reboot of the
operating system.
Everything what can be done is to delete the broken record using recordset
query. After that it is required to recreate it to make it work again.
It is observed on Exchange 2000 SP2/SP3 and Exchange 2003 Servers. MDAC version
2.8 is installed. Please answer to this problem.
If You click this Api slower (5s interval between clicks - everything seems to
works OK) Any faster call to this procedure breaks the registration Event Record.
The original Microsoft's function code below:
Private Sub cmdDisEvtReg_Click()
On Error Resume Next
' Declare variables.
Dim strEventRegItemURL As String
Dim cnn As New ADODB.Connection
Dim recEvtRegItm As New ADODB.Record
Dim strResponse As String
' Set the provider to be the EXOLEDB provider.
cnn.Provider = "exoledb.datasource"
' Build the URL of the event registration item.
strEventRegItemURL = txtFolderURL.Text & txtRegName.Text
' Open the connection.
cnn.ConnectionString = txtFolderURL.Text
cnn.Open
' Error checking.
If Err.Number <> 0 Then
txtResponse.Text = txtResponse.Text & "Error opening connection: " &
Err.Number & " " & Err.Description & _
". This program must be run on an Exchange Server. "
Exit Sub
End If
' Begin trasaction.
cnn.BeginTrans
With recEvtRegItm
' Open the event registration item.
.Open strEventRegItemURL, cnn, adModeReadWrite
' Error checking.
If Err.Number <> 0 Then
txtResponse.Text = txtResponse.Text & "Error opening record: " &
Err.Number & " " & Err.Description & ". "
Exit Sub
End If
' Enable/Disable the event.
If .Fields(PROP_ENABLED) = False Then
.Fields(PROP_ENABLED) = True
strResponse = "Event registration item enabled. "
Else
.Fields(PROP_ENABLED) = False
strResponse = "Event registration item disabled. "
End If
' Update the fields.
.Fields.Update
' Error checking.
If Err.Number <> 0 Then
txtResponse.Text = txtResponse.Text & "Error updating fields: " &
Err.Number & " " & Err.Description & ". "
Exit Sub
End If
End With
' Commit transaction.
cnn.CommitTrans
' Error checking.
If Err.Number <> 0 Then
txtResponse.Text = txtResponse.Text & "Error committing transaction: "
& Err.Number & " " & Err.Description & ". "
Exit Sub
End If
' Set the response textbox.
txtResponse.Text = txtResponse.Text & strResponse
End Sub