0 Replies - 4528 Views - Last Post: 21 November 2002 - 11:48 AM Rate Topic: -----

#1 supernova333  Icon User is offline

  • D.I.C Addict

Reputation: 4
  • View blog
  • Posts: 590
  • Joined: 12-March 02

Ado Exchange Connection

Posted 21 November 2002 - 11:48 AM

I am trying to get a script working that will tell me how many new email messages a person has on an Exchange 2000 server. Here is the script I was given:

(MAILSERVER = url to mail server, USERNAME = user on the exchange server)
<%
Wscript.echo GetInboxItems("http://MAILSERVER","USERNAME")

Function GetInboxItems(url,user)
	
	On Error Goto 0
	
	intInboxItems = 0
	urlWebstorage = url & user & "/inbox"

	Set conn = CreateObject("ADODB.Connection")
	Set objRec = CreateObject("ADODB.Recordset")
	conn.Provider = "ExOLEDB.DataSource"
	conn.Open urlWebstorage
  
	strSQL = "SELECT ""DAV:displayname"", ""DAV:creationdate"", ""DAV:from"" FROM"
	strSQL = strSQL & " SCOPE('shallow traversal of """ & urlWebstorage & """')" 
	strSQL = strSQL & " WHERE ""DAV:ishidden"" = False and ""DAV:isfolder"" = False"
  
	objRec.Open strSQL, conn
	intInboxItems = CInt(objRec.RecordCount)
	
	GetInboxItems = intInboxItems
	
End Function
%>

If I run this with our mail server and a username I get this error:

Quote

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

/ex.asp, line 14


Anyone have any ideas?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1