P
Peter Marchert
Hello,
in OL 2000 sql queries are unnormally slow. The following code
sometimes take more then 1 second to finnish (without logon):
Option Explicit
Dim g_objRDOSession As Object
Public Sub Test()
Dim objFolder As Object
Dim sglStart As Single
Dim sglEnd As Single
If g_objRDOSession Is Nothing Then
Set g_objRDOSession = CreateObject("Redemption.RDOSession")
Call g_objRDOSession.Logon("", "", False, False, 0)
End If
Set objFolder = Outlook.Session.GetDefaultFolder(olFolderCalendar)
sglStart = Timer
Debug.Print ExecuteSQL(objFolder)
sglEnd = Timer
Debug.Print "Duration: " & sglEnd - sglStart & " seconds"
End Sub
Public Function ExecuteSQL(ByVal objFolder As Object) As String
Dim objTable As Object
Dim objRecordSet As Object
Dim strSQL As String
Set objTable = CreateObject("Redemption.MAPITable")
objTable.Item = g_objRDOSession.GetFolderFromID(objFolder.EntryID,
_
objFolder.Parent.StoreID).Items
strSQL = "SELECT Subject FROM Folder WHERE (Subject <> '')"
Set objRecordSet = objTable.ExecSQL(strSQL)
ExecuteSQL = "TEST"
End Function
I tried this code with OL 2000/SP3 on a Win 2000/SP4 machine and an
Exchange Server 2003. I also tried it without Exchange and a local pst
file. Seems to be a little bit faster but not significant. On 2002 and
higher it works fine (tried on XP and Vista machines).
So the question is: Is this a known issu from OL/WIN 2000 or may be
the redemption can cause the problem?
Thanks for any hints.
Peter
in OL 2000 sql queries are unnormally slow. The following code
sometimes take more then 1 second to finnish (without logon):
Option Explicit
Dim g_objRDOSession As Object
Public Sub Test()
Dim objFolder As Object
Dim sglStart As Single
Dim sglEnd As Single
If g_objRDOSession Is Nothing Then
Set g_objRDOSession = CreateObject("Redemption.RDOSession")
Call g_objRDOSession.Logon("", "", False, False, 0)
End If
Set objFolder = Outlook.Session.GetDefaultFolder(olFolderCalendar)
sglStart = Timer
Debug.Print ExecuteSQL(objFolder)
sglEnd = Timer
Debug.Print "Duration: " & sglEnd - sglStart & " seconds"
End Sub
Public Function ExecuteSQL(ByVal objFolder As Object) As String
Dim objTable As Object
Dim objRecordSet As Object
Dim strSQL As String
Set objTable = CreateObject("Redemption.MAPITable")
objTable.Item = g_objRDOSession.GetFolderFromID(objFolder.EntryID,
_
objFolder.Parent.StoreID).Items
strSQL = "SELECT Subject FROM Folder WHERE (Subject <> '')"
Set objRecordSet = objTable.ExecSQL(strSQL)
ExecuteSQL = "TEST"
End Function
I tried this code with OL 2000/SP3 on a Win 2000/SP4 machine and an
Exchange Server 2003. I also tried it without Exchange and a local pst
file. Seems to be a little bit faster but not significant. On 2002 and
higher it works fine (tried on XP and Vista machines).
So the question is: Is this a known issu from OL/WIN 2000 or may be
the redemption can cause the problem?
Thanks for any hints.
Peter