Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Fri, 9 Jun 2006 11:42:45 -0500,    group: microsoft.public.exchange.development        back       


How to query for custom field in public folder?   
Hello,

In a public folder I have defined custom fields; now I want to query the 
folder for those fields. The following code (in VB6) works, but the 
recordset does not have my custom columns, only the standard ones.

---------------
    Set ADOConn = New ADODB.Connection
    Set ADORS = New ADODB.Recordset
    ADOConn .Provider = "Microsoft.JET.OLEDB.4.0"
    ADOConn .Open "Exchange 4.0;MAPILEVEL=Public Folders|\All Public 
Folders;TABLETYPE=0;DATABASE=C:\TEMP\"
    ADORS.Open "SELECT * from MYPUBLICFOLDER", ADOConn, adOpenStatic, 
adLockReadOnly
---------------

if I specify SELECT MYFIELD instead of SELECT *, it returns error "No value 
given for one more more required parameters".

Is there a way to query for custom fields? The ultimate purpose of this is 
autonumbering of posts in the folder - ideally, I would issue SELECT 
MAX(MYFIELD)+1 and assigne it to MYFIELD in the newly-created post.

thanks,

Vadim Rapp
date: Fri, 9 Jun 2006 11:42:45 -0500   author:   Vadim Rapp

Re: How to query for custom field in public folder?   
The OLEDB connection only gives you access to a subset of the properties for 
any item type (only about 44 properties for a contact item for example) and 
no access to user defined properties.

You can take a look at Michael Kaplan's article about adding other fields to 
an Outlook OLEDB connection, but I've never gotten it to work myself.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Vadim Rapp"  wrote in message 
news:uzL%23%23O%23iGHA.3588@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> In a public folder I have defined custom fields; now I want to query the 
> folder for those fields. The following code (in VB6) works, but the 
> recordset does not have my custom columns, only the standard ones.
>
> ---------------
>    Set ADOConn = New ADODB.Connection
>    Set ADORS = New ADODB.Recordset
>    ADOConn .Provider = "Microsoft.JET.OLEDB.4.0"
>    ADOConn .Open "Exchange 4.0;MAPILEVEL=Public Folders|\All Public 
> Folders;TABLETYPE=0;DATABASE=C:\TEMP\"
>    ADORS.Open "SELECT * from MYPUBLICFOLDER", ADOConn, adOpenStatic, 
> adLockReadOnly
> ---------------
>
> if I specify SELECT MYFIELD instead of SELECT *, it returns error "No 
> value given for one more more required parameters".
>
> Is there a way to query for custom fields? The ultimate purpose of this is 
> autonumbering of posts in the folder - ideally, I would issue SELECT 
> MAX(MYFIELD)+1 and assigne it to MYFIELD in the newly-created post.
>
> thanks,
>
> Vadim Rapp
date: Mon, 12 Jun 2006 09:03:42 -0400   author:   Ken Slovak - [MVP - Outlook]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us