Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem on querying Access link table in ASP page

Thread Tools

Problem on querying Access link table in ASP page

Posts: n/a
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=VBScript %>
<!-- #INCLUDE VIRTUAL="/intranet/connection.asp" -->
<% Response.Buffer = true %>

Dim RecordSet, strSQL, strUsername

strUsername = Request.Form("Username")

strSQL = "SELECT Alias FROM StaffList"

Set RecordSet = Server.CreateObject("ADODB.Recordset")
RecordSet.Open strSQL, databaseConnection

Do Until RecordSet.EOF
If(StrComp(RecordSet("Alias"), strUsername) = 0) Then
Response.Write ("You are staff")

Set RecordSet = Nothing
Set databaseConnection = Nothing

The ASP code for connection.asp:
Dim databaseConnection
Set databaseConnection = Server.CreateObject("ADODB.Connection")
databaseConnection.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("/intranet/IntranetDB.mdb") & ";"

Please tell me what do you observe? I'm really stuck.

Thank you.
Reply With Quote
Ray Costanzo [MVP]
Posts: n/a

Ray at work

"tabonni" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi All
> I connected MS Exchange Server to MS Access database using Access link
> table function. I can open the databas

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Querying Indexing Services from ASP.Net page C Jay Pemberton Jr ASP .Net 7 12-29-2005 11:04 PM
Querying Index Services from ASP.NET page ASP .Net 0 12-21-2005 06:27 PM
Asp/SQL server error when querying table Rasta ASP General 2 08-04-2005 08:15 PM
ASP.Net querying Active Directory works on one page and not anothe =?Utf-8?B?VHJleSBNaXRjaGVsbA==?= ASP .Net 0 07-19-2005 05:57 PM
Querying Outlook Calendar from Asp.Net Page =?Utf-8?B?Sm9zZQ==?= ASP .Net 0 02-14-2005 03:47 PM