Error in IE when running ASP Page.

L

Leon

I keep geting this error in the IE when trying to run the scrept below from
an ASP page. Can any one help please.


Error Type:
Provider (0x80040E37)
Table does not exist.
/gal.asp, line 43


<HTML>

<BODY>

<CENTER><H2>Wheeling Departmental Directory</H2><CENTER>

</TABLE>

<%

'TO DO : Change the below name to your Exchange server name

'

' Note if you want to use NT Challenge Response authentication this

' will need to be the same machine as the ASP is running on

strServerName = "ou=Companies,dc=group,dc=Test,dc=local"

strUser = Request.ServerVariables("LOGON_USER") 'retrieve the user

if strUser = "" then

Response.Write "You are using Anonymous authentication you will need to
change it so the user can be identified"

Response.End

end if



set oConn = CreateObject("ADODB.Connection")

set oCommand = CreateObject("ADODB.Command")

set oRS = CreateObject("ADODB.Recordset")



oConn.Provider = "ADsDSOObject"

oConn.Open "Ads Provider"



set oCommand.ActiveConnection = oConn 'set the active connection



' Next we will build the LDAP query that will be used to retrieve the
contents of the GAL.

' We will specify which server we want to run the query against,

' a filter for what types of objects we are looking for, the attributes we
would like

' returned, and the type of search

' A filter of (objectClass=person) will return mailboxes, distribution
lists, and custom recipients



strQuery= "<LDAP://" & strServername &
">;(objectClass=person);name,telephoneNumber,mobile,title,department,mail,facsimileTelephoneNumber,pager,otherTelephone"



oCommand.CommandText = strQuery

oCommand.Properties("Sort On") = "name"

oCommand.Properties("Page Size") = 99 'a paged query is used to avoid
Exchange LDAP server limits

set oRS = oCommand.Execute 'Execute the query



' Now we will loop through the results of our query

' and build a table to display the Global Address List



%>

<TABLE BORDER=4>

<TR>

<TH>Name/Title</br>Department/Email<TH>Work/Fax Numbers<TH>Mobile Numbers

<%

While not oRS.EOF

arrPhone = oRS.Fields("otherTelephone")

%>



<TR>



<TD><b><%=oRS.Fields("name")%></b></b></br><i><%=oRS.Fields("title")%></i></br><%=oRS.Fields("department")%></br>

<a

href="mailto:<%=oRS.Fields("mail")%>"><%=oRS.Fields("mail")%></a>

<TD>Work: <%=oRS.Fields("telephoneNumber")%></br>

Fax: <%=oRS.Fields("facsimileTelephoneNumber")%>

<TD>Mobile: <%=oRS.Fields("mobile")%></br>

Nextel: <%=oRS.Fields("pager")%></br>

<%

oRS.MoveNext

wend

%>

</TABLE>

</BODY>

</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top