Connecting to linked SQL tables through access

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

  1. #1

    Default Connecting to linked SQL tables through access

    Hello,

    I have searched the web and can't find a solution, but
    this must (maybe) be common. I am creating an asp page
    that connects to an access database which contains linked
    SQL tables.

    I can query and manipulate data in tables that aren't
    linked, but when I try to run a query (qry Invoice) that
    accesses data in un-linked tables and linked tables I get
    the following error.

    Even if I change the IIS server to use integrated
    authentication I get the same error.

    Error Type:
    Microsoft JET Database Engine (0x80004005)
    ODBC--connection to 'fin_live' failed.
    /rcweb/asp/invoices.asp, line 55


    Here's the code:

    Dim connStr
    Dim rsSelect
    Dim vbInvoice
    Dim sql1
    vbInvoice = Request.Form("SelInvoice") + 0
    connStr = "PROVIDER = MICROSOFT.JET.OLEDB.4.0;Data Source
    = " & Server.MapPath("ReportsWeb.mdb")
    Dim con
    set con = Server.CreateObject("ADODB.Connection")
    con.Open connStr

    con.Execute "exec [qry Invoice]"

    Thanks for any ideas,
    Bonnie

    Bonnie Guest

  2. Similar Questions and Discussions

    1. Problem: Cannot query linked Access tables in CFMX 6.1
      I?m using CFMX 6.1 on a Windows Server 2003. I have an Access DB with some tables linked to a SQL Server 2000 DB running on another machine. When I...
    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 'tables' (access) local - to -remote?
      Is it actually possible for a local access 2000 database to link to a remote database online via linked tables... I know www.aspfaq.com has...
    4. problems with linked access tables in ASP
      Hello, I've seen this posting many times, but there are no responses to it... I hope it's not too difficult to fix. I have two databases, one...
    5. Access query of linked tables returns EOF
      It works fine for me. I created a database called db14.mdb containing one local and two linked tables (each from a different database). I then...
  3. #2

    Default Re: Connecting to linked SQL tables through access

    Bonnie wrote:
    > Hello,
    >
    > Microsoft JET Database Engine (0x80004005)
    > ODBC--connection to 'fin_live' failed.
    > /rcweb/asp/invoices.asp, line 55
    >
    >
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;245587&Product=ado[/url]

    HTH,
    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

  4. #3

    Default Re: Connecting to linked SQL tables through access

    Hello,

    I read that article and added the following code to create
    a dummy recordset, but on this line I get the same error
    message. I even tried the administrator username and
    password. fin_live is a system dsn, I replaced username
    and password with actuals ( I did not use quotes

    Dim rs
    Set rs = con.execute("SELECT * FROM
    [ODBC;DSN=fin_live;uid=Username;pwd=Password;databa se=pubs]
    ..Invoice_Headers WHERE Invoice_Number = 102248")
    rs.close

    Thanks for any additional ideas,
    Bonnie
    >-----Original Message-----
    >Bonnie wrote:
    >> Hello,
    >>
    >> Microsoft JET Database Engine (0x80004005)
    >> ODBC--connection to 'fin_live' failed.
    >> /rcweb/asp/invoices.asp, line 55
    >>
    >>
    >[url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]
    us;245587&Product=ado
    >
    >HTH,
    >Bob Barrows
    >--
    >Microsoft MVP -- ASP/ASP.NET
    >Please reply to the newsgroup. The email account listed
    in my From
    >header is my spam trap, so I don't check it very often.
    You will get a
    >quicker response by posting to the newsgroup.
    >
    >
    >.
    >
    Bonnie Guest

  5. #4

    Default Re: Connecting to linked SQL tables through access

    Bonnie wrote:
    > Hello,
    >
    > I read that article and added the following code to create
    > a dummy recordset, but on this line I get the same error
    > message. I even tried the administrator username and
    > password. fin_live is a system dsn, I replaced username
    > and password with actuals ( I did not use quotes
    >
    > Dim rs
    > Set rs = con.execute("SELECT * FROM
    > [ODBC;DSN=fin_live;uid=Username;pwd=Password;databa se=pubs]
    > .Invoice_Headers WHERE Invoice_Number = 102248")
    > rs.close
    >
    > Thanks for any additional ideas,
    Sorry, but I've never used Access this way so I can't offer any more
    assistance.
    (I would have said "WHERE 1=2" to prevent any records from being returned).

    Have you tried the other suggestion of persisting the login info in the
    table link?

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

  6. #5

    Default Re: Connecting to linked SQL tables through access

    Thanks anyway.

    Yes, the login info is already stored in the table in
    access. If I run documenter on the table you can see that
    the username and password are stored.

    I thought it was common to use linked tables from an sql
    database and to use access as the front end. I am trying
    to use access queries in the asp pages instead of going
    directly to the sql table, but even when I try that it
    still doesn't work...

    Thanks again,
    Bonnie

    >-----Original Message-----
    >Bonnie wrote:
    >> Hello,
    >>
    >> I read that article and added the following code to
    create
    >> a dummy recordset, but on this line I get the same error
    >> message. I even tried the administrator username and
    >> password. fin_live is a system dsn, I replaced username
    >> and password with actuals ( I did not use quotes
    >>
    >> Dim rs
    >> Set rs = con.execute("SELECT * FROM
    >>
    [ODBC;DSN=fin_live;uid=Username;pwd=Password;databa se=pubs]
    >> .Invoice_Headers WHERE Invoice_Number = 102248")
    >> rs.close
    >>
    >> Thanks for any additional ideas,
    >
    >Sorry, but I've never used Access this way so I can't
    offer any more
    >assistance.
    >(I would have said "WHERE 1=2" to prevent any records
    from being returned).
    >
    >Have you tried the other suggestion of persisting the
    login info in the
    >table link?
    >
    >Bob Barrows
    >--
    >Microsoft MVP -- ASP/ASP.NET
    >Please reply to the newsgroup. The email account listed
    in my From
    >header is my spam trap, so I don't check it very often.
    You will get a
    >quicker response by posting to the newsgroup.
    >
    >
    >.
    >
    Bonnie 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