Hi All
I connected MS Exchange Server to MS Access database using Access link
table function. I can open the database table and see the fields and
data inside the link table. However, the table seems cannot be queried
by SQL statement.
My situation is:
I'm building an intranet. I have a ASP login page for all staff in the
company to login. Other people can't register or login the intranet.
That's the reason I use the company email address to verify username
login name.
After I made the link to the Global Address List (rename to
StaffList), I can see the Alias field. I wrote ASP code to use Alias
field to verify user login name. But, the ASP page seems experiencing
difficulties. I always got the "Connection Timeout" Error.
The procedure I connect Exchange to Access:
[New Table -> Link Table -> File of Type [I choose Exchange()] ->
Choose "Global Adress List" -> Rename to "StaffList -> Finish]
My ASP code is as follow:
<%@ Language=VBScri pt %>
<!-- #INCLUDE VIRTUAL="/intranet/connection.asp" -->
<% Response.Buffer = true %>
<%
Dim RecordSet, strSQL, strUsername
strUsername = Request.Form("U sername")
strSQL = "SELECT Alias FROM StaffList"
Set RecordSet = Server.CreateOb ject("ADODB.Rec ordset")
RecordSet.Open strSQL, databaseConnect ion
Do Until RecordSet.EOF
If(StrComp(Reco rdSet("Alias"), strUsername) = 0) Then
Response.Write ("You are staff")
Else
RecordSet.MoveN ext
Loop
RecordSet.Close
Set RecordSet = Nothing
databaseConnect ion.Close
Set databaseConnect ion = Nothing
%>
The ASP code for connection.asp:
<%
Dim databaseConnect ion
Set databaseConnect ion = Server.CreateOb ject("ADODB.Con nection")
databaseConnect ion.ConnectionS tring =
"Provider=Micro soft.Jet.OLEDB. 4.0; Data Source=" &
Server.MapPath( "/intranet/IntranetDB.mdb" ) & ";"
databaseConnect ion.Open
%>
Please tell me what do you observe? I'm really stuck.
Thank you.
I connected MS Exchange Server to MS Access database using Access link
table function. I can open the database table and see the fields and
data inside the link table. However, the table seems cannot be queried
by SQL statement.
My situation is:
I'm building an intranet. I have a ASP login page for all staff in the
company to login. Other people can't register or login the intranet.
That's the reason I use the company email address to verify username
login name.
After I made the link to the Global Address List (rename to
StaffList), I can see the Alias field. I wrote ASP code to use Alias
field to verify user login name. But, the ASP page seems experiencing
difficulties. I always got the "Connection Timeout" Error.
The procedure I connect Exchange to Access:
[New Table -> Link Table -> File of Type [I choose Exchange()] ->
Choose "Global Adress List" -> Rename to "StaffList -> Finish]
My ASP code is as follow:
<%@ Language=VBScri pt %>
<!-- #INCLUDE VIRTUAL="/intranet/connection.asp" -->
<% Response.Buffer = true %>
<%
Dim RecordSet, strSQL, strUsername
strUsername = Request.Form("U sername")
strSQL = "SELECT Alias FROM StaffList"
Set RecordSet = Server.CreateOb ject("ADODB.Rec ordset")
RecordSet.Open strSQL, databaseConnect ion
Do Until RecordSet.EOF
If(StrComp(Reco rdSet("Alias"), strUsername) = 0) Then
Response.Write ("You are staff")
Else
RecordSet.MoveN ext
Loop
RecordSet.Close
Set RecordSet = Nothing
databaseConnect ion.Close
Set databaseConnect ion = Nothing
%>
The ASP code for connection.asp:
<%
Dim databaseConnect ion
Set databaseConnect ion = Server.CreateOb ject("ADODB.Con nection")
databaseConnect ion.ConnectionS tring =
"Provider=Micro soft.Jet.OLEDB. 4.0; Data Source=" &
Server.MapPath( "/intranet/IntranetDB.mdb" ) & ";"
databaseConnect ion.Open
%>
Please tell me what do you observe? I'm really stuck.
Thank you.
Comment