|
|
|
date: Thu, 14 Feb 2008 14:33:01 -0800,
group: microsoft.public.exchange.design
back
ADO queries always fail?
Here's my code, verbatim:
conn = ("Provider=Microsoft.Jet.OLEDB.4.0;Exchange 4.0;MAPILEVEL=Public
Folders|All Public Folders;DATABASE=C:\\Temp\\;")
Set rstEmails = New ADODB.Recordset
rstEmails.Open "SELECT * FROM pricing WHERE ""Has Attachments""=1", conn,
adOpenStatic, adLockReadOnly
While Not rstEmails.EOF
Debug.Print rstEmails!Subject
rstEmails.MoveNext
Wend
The "pricing" folder has three files in it, two of which have attachments. I
want to get all of the ones that have attachments.
Most of what I trye after the ""Has Attachments""= returns a data type
mismatch...
""Has Attachments""=1
""Has Attachments""=yes
The only one that works is...
""Has Attachments""=true
But when I use that, I get all the messages, not just the ones with the
attachments. So I tried another tack..
rstEmails.Open "SELECT * FROM pricing WHERE recieved>='" & date & "'",
conn, adOpenStatic, adLockReadOnly
data type mismatch.
Is there some secret I need to know?
Maury
date: Thu, 14 Feb 2008 14:33:01 -0800
author: Maury Markowitz
|
|