Open an MS Access Linked Table via ASP

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Open an MS Access Linked Table via ASP

    I have a MS Access database. Within this database, I have
    several linked tables that connect to a mainframe's
    database. The linked tables use a DSN to connect to the
    mainframe. I want to open the Access database and query
    the linked tables from an ASP page. However, the DSN that
    the linked tables use require a password. What should I
    do? Here is a snippet of my code:

    adoSiteCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=D:\wwwroot2\GCCC
    FORMS\events\eventsdb\eventsdb.mdb;Persist Security
    Info=False;Jet OLEDB:Database Password=nunya"

    'Create an ADO recordset object
    Set rsSites = Server.CreateObject("ADODB.Recordset")

    'SQL statement to query the linked table
    strSiteSQL = "SELECT * FROM csrs_site;"

    rsSites.CursorLocation = 3 'adUseClient

    'Open the recordset with the SQL query
    rsSites.Open strSiteSQL, adoSiteCon

    When I run the ASP page, I get the following error:
    Microsoft JET Database Engine error '80004005'
    ODBC--connection to 'csrsdsn' failed.

    I'm assuming this is because I'm not giving the DSN (that
    the linked tables use to connect to the mainframe) a
    password.
    Jason Whitaker Guest

  2. Similar Questions and Discussions

    1. Updating multiple records in a linked table simultaneously
      I am working on an e-commerce application and I need help with updating the product details for a single product with multiple formats. --DB...
    2. Connecting to a Linked Table in Access
      I am using Dreamweaver MX 2004. I am trying to connect, via Dreamweaver, to a linked file in Access. The linked file is connected to a text file...
    3. Linked Table
      I am building a site to sell cd's and cassettes. There are currently over 600 albums from over 250 artists broke in to 20 categories. The thing...
    4. Can't open Illustrator 10 files with linked images
      I'm getting the spinning cursor when trying to open Illustrator 10 files with linked images. This problem isn't happening with files containing...
    5. Open linked PDF-Files from a PDF-File
      Paul, Open up the PDF file using a FileStream, then read it in using a BinaryReader, then replace the URL links in the file, then write the file...
  3. #2

    Default Re: Open an MS Access Linked Table via ASP

    Does this help:
    [url]http://support.microsoft.com/?id=245587[/url]
    How To: Supply User Authentication when Opening Jet Linked Tables to ODBC
    Datasources

    Cheers
    Ken


    "Jason Whitaker" <jason.whitaker@titan.com> wrote in message
    news:05fc01c3459f$8dc1a2a0$a301280a@phx.gbl...
    : I have a MS Access database. Within this database, I have
    : several linked tables that connect to a mainframe's
    : database. The linked tables use a DSN to connect to the
    : mainframe. I want to open the Access database and query
    : the linked tables from an ASP page. However, the DSN that
    : the linked tables use require a password. What should I
    : do? Here is a snippet of my code:
    :
    : adoSiteCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
    : Source=D:\wwwroot2\GCCC
    : FORMS\events\eventsdb\eventsdb.mdb;Persist Security
    : Info=False;Jet OLEDB:Database Password=nunya"
    :
    : 'Create an ADO recordset object
    : Set rsSites = Server.CreateObject("ADODB.Recordset")
    :
    : 'SQL statement to query the linked table
    : strSiteSQL = "SELECT * FROM csrs_site;"
    :
    : rsSites.CursorLocation = 3 'adUseClient
    :
    : 'Open the recordset with the SQL query
    : rsSites.Open strSiteSQL, adoSiteCon
    :
    : When I run the ASP page, I get the following error:
    : Microsoft JET Database Engine error '80004005'
    : ODBC--connection to 'csrsdsn' failed.
    :
    : I'm assuming this is because I'm not giving the DSN (that
    : the linked tables use to connect to the mainframe) a
    : password.


    Ken Schaefer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139