Solved

Accessing Exchange Mailbox via ADO.NET

Posted on 2003-12-03
12
874 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

696 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