Solved

Accessing Exchange Mailbox via ADO.NET

Posted on 2003-12-03
12
871 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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
 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How would you add MULTITHREADING to the attached C# code? 4 62
SQL Exceptions 3 43
Call windows 10 virtual keyboard from windows forms app 2 32
VB.NET 2008 Publish Error 2 24
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

813 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

18 Experts available now in Live!

Get 1:1 Help Now