Solved

Accessing Exchange Mailbox via ADO.NET

Posted on 2003-12-03
12
872 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

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