View Single Post
  #3  
Old November 16th 07, 09:41 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.office.developer.vba,microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption MAPITable Question

Also note that if you use "select *", Redemption will decide what names the
columns will have, and those will DASL names.
If you need Email1DisplayName, explicitly request it; there is no reason to
use * besides slowing down your network :-)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Your code works here.

Are you using a version of Redemption that supports ExecSQL? Check your
version and check the Object Browser to see if your version of Redemption
supports that method.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Patrick Pirtle" pap at mka dot com wrote in message
...
Well, this seems like it should be simple. So, I assume I'm
overlooking something small.

Here's my code:


Public Sub TestMapiTable()
Dim oRecordset As Object
Dim oTable As Object

Set oTable = CreateObject("Redemption.MAPITable")
oTable.item = Outlook.Session.GetDefaultFolder(olFolderContacts) .Items

Set oRecordset = oTable.ExecSQL("SELECT * from Folder")
While Not oRecordset.EOF
Debug.Print (oRecordset.Fields("Email1DisplayName").Value)
oRecordset.MoveNext
Wend
End Sub


The line beginning "Set oRecordset = oTable.ExecSQL"
gives me an error "Object doesn't support this property
or method." TIA for any help as to what I'm missing.



____________________________________________
The impossible just takes a little longer...




Ads