Solved

Accessing Exchange Mailbox via ADO.NET

Posted on 2003-12-03
12
869 Views
Last Modified: 2007-12-19
Hi everybody,

does anybody has any experience how to connect to an exchange server and read the content of the user mailboxes ? How must the connection string look like ? What is the structure of the exchange server database ? A little code example would be great ;-) .....
0
Comment
Question by:new_user_xyz
12 Comments
 
LVL 4

Expert Comment

by:NetPointer
ID: 9868496
I think u have to use ComInterOp for CDO or WebDAV....

check the following url for further help

http://www.only4gurus.com/v2/preview.asp?ID=74
http://www.vbug.co.uk/dnz/support/faq/tsviewa.asp?AID=487&QID=479

0
 
LVL 12

Expert Comment

by:vascov
ID: 9868797
You can also use the ExOleDB provider.

Support Policy for Microsoft Exchange APIs with .NET Framework Applications
http://support.microsoft.com/?kbid=813349

HTH
0
 

Author Comment

by:new_user_xyz
ID: 9874478
Hi NetPointer, hi vascov,  
.... but there should be a way to connect to the exchange server via ADO.NET!!! .... does any body has any experience with that ??
0
 
LVL 12

Expert Comment

by:vascov
ID: 9875803
ExOLEDB is an OLEDB provider.

You can use System.Data.OleDb namespace.
0
 

Author Comment

by:new_user_xyz
ID: 9876064
allright, but how must the connection string look like ?
To get data from the exchange server's database I need to know the tablenames and the rownames etc. .... from where can I get info about the database schema ?
0
 
LVL 12

Expert Comment

by:roverm
ID: 9876336
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 12

Accepted Solution

by:
vascov earned 250 total points
ID: 9876398
Here's a small sample:

      OleDbConnection conn = new OleDbConnection( @"Provider=Exoledb.DataSource.1;User ID=LOBOMAU\Administrator;
Password=y0uw1$h;Mode=Read;Data Source=file://./backofficestorage/my.exchange.domain.com/MBX/Administrator" );
      OleDbDataAdapter da = new OleDbDataAdapter( "SELECT * FROM Inbox", conn );      
      DataSet ds = new DataSet();
      da.Fill( ds );
      dataGrid1.SetDataBinding( ds, "" );

A tip to find out the shema is to add a connection to the server explorer in VS.NEt. Then it's just point and click...

Also look at this page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/wss_references_oledb.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_expdk_exoledb_file_url_namespace.asp?frame=true

HTH

0
 
LVL 12

Expert Comment

by:vascov
ID: 9876429
BTW, the password in the connection string is just for sample purposes. Don't do that in your production code :)
0
 
LVL 12

Expert Comment

by:vascov
ID: 9889603
Did this help ?
0
 

Author Comment

by:new_user_xyz
ID: 9905838
hi vascov, sorry my answer took so long ;-) ..... at the moment I've to do some other stuff and I will check out how to get access to the exchange mailbox via ADO.NET at the end of the week .... you'll get a message from me at that time ....
0
 
LVL 12

Expert Comment

by:vascov
ID: 10040035
hi, have you had the opportunity to try it ?
0
 

Author Comment

by:new_user_xyz
ID: 10050928
hi, not at all .... but I will try out as soon as possible ;-) ....
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now