Problem on querying Access link table in ASP page

Discussion in 'ASP General' started by tabonni, Oct 14, 2004.

  1. tabonni

    tabonni Guest

    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")
    Else
    RecordSet.MoveNext
    Loop

    RecordSet.Close
    Set RecordSet = Nothing
    databaseConnection.Close
    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") & ";"
    databaseConnection.Open
    %>

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

    Thank you.
     
    tabonni, Oct 14, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/5003

    Ray at work

    "tabonni" <> wrote in message
    news:...
    > Hi All
    >
    > I connected MS Exchange Server to MS Access database using Access link
    > table function. I can open the databas
     
    Ray Costanzo [MVP], Oct 14, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9zZQ==?=

    Querying Outlook Calendar from Asp.Net Page

    =?Utf-8?B?Sm9zZQ==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    477
    =?Utf-8?B?Sm9zZQ==?=
    Feb 14, 2005
  2. =?Utf-8?B?VHJleSBNaXRjaGVsbA==?=

    ASP.Net querying Active Directory works on one page and not anothe

    =?Utf-8?B?VHJleSBNaXRjaGVsbA==?=, Jul 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    397
    =?Utf-8?B?VHJleSBNaXRjaGVsbA==?=
    Jul 19, 2005
  3. Replies:
    0
    Views:
    379
  4. C Jay Pemberton Jr

    Querying Indexing Services from ASP.Net page

    C Jay Pemberton Jr, Dec 28, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    571
    Mr Newbie
    Dec 29, 2005
  5. Rasta
    Replies:
    2
    Views:
    144
    Rasta
    Aug 4, 2005
Loading...

Share This Page