problems with linked access tables in ASP

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

  1. #1

    Default 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 primary one, and another one which contains
    a table that I need to use. So, I linked the table I need in the
    secondary db to the primary database. Now, when I try to create a
    recordset object to it in ASP, I get the following error:

    Microsoft][ODBC Microsoft Access Driver] 'V:\DB\Conf.mdb' is not a
    valid path. Make sure that the path name is spelled correctly and that
    you are connected to the server on which the file resides.


    Conf.mdb is the secondary database that contains the table originally.
    The connection that I have is to the primary database.

    I really don't know what's going on, since all the other tables in the
    db (that are not linked from somewhere else) work perfectly and I can
    read information form them through ASP.

    Thanks for any help,
    Laura
    Laura 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. LInked Tables...
      I am getting the wrong id, when I create the link to the details page from the code below. What I get is the Artist #id#, I want the Album #id# ...
    3. 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...
    4. 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...
    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: problems with linked access tables in ASP

    Drive letters are mapped for the logged on user only. So, just because you
    logon and map drive v: doesn't mean that it is mapped for *other* users,
    including IUSR_<machinename>

    Suggest you use UNC naming instead: \\server\share\conf.mdb

    Cheers
    Ken

    "Laura" <salamahl@aecl.ca> wrote in message
    news:3b666b7a.0308181117.2f87d097@posting.google.c om...
    : 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 primary one, and another one which contains
    : a table that I need to use. So, I linked the table I need in the
    : secondary db to the primary database. Now, when I try to create a
    : recordset object to it in ASP, I get the following error:
    :
    : Microsoft][ODBC Microsoft Access Driver] 'V:\DB\Conf.mdb' is not a
    : valid path. Make sure that the path name is spelled correctly and that
    : you are connected to the server on which the file resides.
    :
    :
    : Conf.mdb is the secondary database that contains the table originally.
    : The connection that I have is to the primary database.
    :
    : I really don't know what's going on, since all the other tables in the
    : db (that are not linked from somewhere else) work perfectly and I can
    : read information form them through ASP.
    :
    : Thanks for any help,
    : Laura


    Ken Schaefer Guest

  4. #3

    Default Re: problems with linked access tables in ASP

    Ok, I tried getting that to work, but the problem now lies with access.

    I didn't specifically hard code in the path to the secondary database
    (V:/.../Conf.mdb). There is a table in that database that is linked to
    another one (\\server\..\mainDatabase.mdb). So, the problem lies with I
    link table in Conf.mdb to mainDatabase.mdb, since access uses the "V:/"
    path.

    So, any ideas how I can get around that? I tried typing in the UNC path,
    but it just told me that the database couldn't be found, invalid path.

    Thanks so much!
    Laura


    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message news:<esKdVafZDHA.736@TK2MSFTNGP09.phx.gbl>...
    > Drive letters are mapped for the logged on user only. So, just because you
    > logon and map drive v: doesn't mean that it is mapped for *other* users,
    > including IUSR_<machinename>
    >
    > Suggest you use UNC naming instead: \\server\share\conf.mdb
    >
    > Cheers
    > Ken
    >
    > "Laura" <salamahl@aecl.ca> wrote in message
    > news:3b666b7a.0308181117.2f87d097@posting.google.c om...
    > : 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 primary one, and another one which contains
    > : a table that I need to use. So, I linked the table I need in the
    > : secondary db to the primary database. Now, when I try to create a
    > : recordset object to it in ASP, I get the following error:
    > :
    > : Microsoft][ODBC Microsoft Access Driver] 'V:\DB\Conf.mdb' is not a
    > : valid path. Make sure that the path name is spelled correctly and that
    > : you are connected to the server on which the file resides.
    > :
    > :
    > : Conf.mdb is the secondary database that contains the table originally.
    > : The connection that I have is to the primary database.
    > :
    > : I really don't know what's going on, since all the other tables in the
    > : db (that are not linked from somewhere else) work perfectly and I can
    > : read information form them through ASP.
    > :
    > : Thanks for any help,
    > : Laura
    Laura Guest

  5. #4

    Default Re: problems with linked access tables in ASP

    I just tested what I believe is your scenerio and it
    worked perfectly.

    DB1: C:\Inetpub\wwwroot\practice.mdb
    DB2: C:\Documents and settings\user\my documents\coe.mdb


    DB1 contains a link to table COE in DB2.

    Here's the ASP code:
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=C:\Inetpub\wwwroot\practice.mdb;Persist Security
    Info=False"
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open strConn

    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.Open "COEs", objConn, 3, 3
    Response.Write "<table cellpadding=2 cellspacing=0
    border=1>" & vbcrlf
    Response.Write " <tr>" & vbcrlf
    For Each Field In objRS.Fields
    Response.Write " <th>" & Field.Name & "</th>" &
    vbcrlf
    Next
    Response.Write " </tr>" & vbcrlf
    Do While Not objRS.Eof
    Response.Write " <tr>" & vbcrlf
    For Each Field In objRS.Fields
    Response.Write " <td>" & Field.Value & "</td>" &
    vbcrlf
    Next
    Response.Write " </tr>" & vbcrlf
    objRS.MoveNext
    Loop
    Response.Write "</table>" & vbcrlf
    strAction = ""



    The output is the contents of the COE table as it should
    be.

    Even tried it with an access database residing on a
    completely different computer. Still works.

    I suspect your error is in connecting to the first DB not
    the linked DB.
    Try reading the contents of a table in the main DB and see
    if you are able to do that. Once you get that working,
    accessing the linked table should be nothing more than
    changing the table name in the SQL statement.

    HTH,
    John



    >-----Original Message-----
    >Ok, I tried getting that to work, but the problem now
    lies with access.
    >
    >I didn't specifically hard code in the path to the
    secondary database
    >(V:/.../Conf.mdb). There is a table in that database that
    is linked to
    >another one (\\server\..\mainDatabase.mdb). So, the
    problem lies with I
    >link table in Conf.mdb to mainDatabase.mdb, since access
    uses the "V:/"
    >path.
    >
    >So, any ideas how I can get around that? I tried typing
    in the UNC path,
    >but it just told me that the database couldn't be found,
    invalid path.
    >
    >Thanks so much!
    >Laura
    >
    >
    >"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in
    message news:<esKdVafZDHA.736@TK2MSFTNGP09.phx.gbl>...
    >> Drive letters are mapped for the logged on user only.
    So, just because you
    >> logon and map drive v: doesn't mean that it is mapped
    for *other* users,
    >> including IUSR_<machinename>
    >>
    >> Suggest you use UNC naming instead:
    \\server\share\conf.mdb
    >>
    >> Cheers
    >> Ken
    >>
    >> "Laura" <salamahl@aecl.ca> wrote in message
    >> news:3b666b7a.0308181117.2f87d097@posting.google.c om...
    >> : 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 primary one, and another
    one which contains
    >> : a table that I need to use. So, I linked the table I
    need in the
    >> : secondary db to the primary database. Now, when I
    try to create a
    >> : recordset object to it in ASP, I get the following
    error:
    >> :
    >> : Microsoft][ODBC Microsoft Access
    Driver] 'V:\DB\Conf.mdb' is not a
    >> : valid path. Make sure that the path name is spelled
    correctly and that
    >> : you are connected to the server on which the file
    resides.
    >> :
    >> :
    >> : Conf.mdb is the secondary database that contains the
    table originally.
    >> : The connection that I have is to the primary
    database.
    >> :
    >> : I really don't know what's going on, since all the
    other tables in the
    >> : db (that are not linked from somewhere else) work
    perfectly and I can
    >> : read information form them through ASP.
    >> :
    >> : Thanks for any help,
    >> : Laura
    >.
    >
    JOhn Beschler Guest

  6. #5

    Default Re: problems with linked access tables in ASP

    hmmm... now I'm really confused. I tried starting from scratch, just
    to see if my original connection isn't right, and nothing.

    My original connection was slightly different (Sytem DSN) but it
    worked with all the tables/queries that are native to the database,
    just not the linked table. So, I basically copied and pasted your code
    and it worked exactly the same way.

    this is my error:

    'V:\REVAMPED\DB\Conf.mdb' is not a valid path. Make sure that the path
    name is spelled correctly and that you are connected to the server on
    which the file resides.

    I don't hard code this path in (v:/revamped...). In my connection, I
    have the UNC path to the main database, and this is the secondary
    database.

    I'm not sure, but I think I need to somehow make MS Access link to the
    database using the UNC path.

    thanks so much in advance!



    "JOhn Beschler" <giles@geewhiz.com> wrote in message news:<038201c36695$65ed5a00$a501280a@phx.gbl>...
    > I just tested what I believe is your scenerio and it
    > worked perfectly.
    >
    > DB1: C:\Inetpub\wwwroot\practice.mdb
    > DB2: C:\Documents and settings\user\my documents\coe.mdb
    >
    >
    > DB1 contains a link to table COE in DB2.
    >
    > Here's the ASP code:
    > strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:\Inetpub\wwwroot\practice.mdb;Persist Security
    > Info=False"
    > Set objConn = Server.CreateObject("ADODB.Connection")
    > objConn.Open strConn
    >
    > Set objRS = Server.CreateObject("ADODB.Recordset")
    > objRS.Open "COEs", objConn, 3, 3
    > Response.Write "<table cellpadding=2 cellspacing=0
    > border=1>" & vbcrlf
    > Response.Write " <tr>" & vbcrlf
    > For Each Field In objRS.Fields
    > Response.Write " <th>" & Field.Name & "</th>" &
    > vbcrlf
    > Next
    > Response.Write " </tr>" & vbcrlf
    > Do While Not objRS.Eof
    > Response.Write " <tr>" & vbcrlf
    > For Each Field In objRS.Fields
    > Response.Write " <td>" & Field.Value & "</td>" &
    > vbcrlf
    > Next
    > Response.Write " </tr>" & vbcrlf
    > objRS.MoveNext
    > Loop
    > Response.Write "</table>" & vbcrlf
    > strAction = ""
    >
    >
    >
    > The output is the contents of the COE table as it should
    > be.
    >
    > Even tried it with an access database residing on a
    > completely different computer. Still works.
    >
    > I suspect your error is in connecting to the first DB not
    > the linked DB.
    > Try reading the contents of a table in the main DB and see
    > if you are able to do that. Once you get that working,
    > accessing the linked table should be nothing more than
    > changing the table name in the SQL statement.
    >
    > HTH,
    > John
    >
    >
    >
    >
    > >-----Original Message-----
    > >Ok, I tried getting that to work, but the problem now
    > lies with access.
    > >
    > >I didn't specifically hard code in the path to the
    > secondary database
    > >(V:/.../Conf.mdb). There is a table in that database that
    > is linked to
    > >another one (\\server\..\mainDatabase.mdb). So, the
    > problem lies with I
    > >link table in Conf.mdb to mainDatabase.mdb, since access
    > uses the "V:/"
    > >path.
    > >
    > >So, any ideas how I can get around that? I tried typing
    > in the UNC path,
    > >but it just told me that the database couldn't be found,
    > invalid path.
    > >
    > >Thanks so much!
    > >Laura
    > >
    > >
    > >"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in
    > message news:<esKdVafZDHA.736@TK2MSFTNGP09.phx.gbl>...
    > >> Drive letters are mapped for the logged on user only.
    > So, just because you
    > >> logon and map drive v: doesn't mean that it is mapped
    > for *other* users,
    > >> including IUSR_<machinename>
    > >>
    > >> Suggest you use UNC naming instead:
    > \\server\share\conf.mdb
    > >>
    > >> Cheers
    > >> Ken
    > >>
    > >> "Laura" <salamahl@aecl.ca> wrote in message
    > >> news:3b666b7a.0308181117.2f87d097@posting.google.c om...
    > >> : 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 primary one, and another
    > one which contains
    > >> : a table that I need to use. So, I linked the table I
    > need in the
    > >> : secondary db to the primary database. Now, when I
    > try to create a
    > >> : recordset object to it in ASP, I get the following
    > error:
    > >> :
    > >> : Microsoft][ODBC Microsoft Access
    > Driver] 'V:\DB\Conf.mdb' is not a
    > >> : valid path. Make sure that the path name is spelled
    > correctly and that
    > >> : you are connected to the server on which the file
    > resides.
    > >> :
    > >> :
    > >> : Conf.mdb is the secondary database that contains the
    > table originally.
    > >> : The connection that I have is to the primary
    > database.
    > >> :
    > >> : I really don't know what's going on, since all the
    > other tables in the
    > >> : db (that are not linked from somewhere else) work
    > perfectly and I can
    > >> : read information form them through ASP.
    > >> :
    > >> : Thanks for any help,
    > >> : Laura
    > >.
    > >
    Laura Guest

  7. #6

    Default Re: problems with linked access tables in ASP

    Remember that your ASP pages do not run in the same
    context as you. In otherwords, when you create the link to
    the 2nd table in Access, you are probably logged in as
    yourself; however, when you ASP page runs it is
    authenticted as (usually) IWAM_computername. You need to
    make sure that the IWAM_computername user has appropriate
    permissions on the 2nd MDB file and that the drive
    mappings are the same.


    >-----Original Message-----
    >hmmm... now I'm really confused. I tried starting from
    scratch, just
    >to see if my original connection isn't right, and nothing.
    >
    >My original connection was slightly different (Sytem DSN)
    but it
    >worked with all the tables/queries that are native to the
    database,
    >just not the linked table. So, I basically copied and
    pasted your code
    >and it worked exactly the same way.
    >
    >this is my error:
    >
    >'V:\REVAMPED\DB\Conf.mdb' is not a valid path. Make sure
    that the path
    >name is spelled correctly and that you are connected to
    the server on
    >which the file resides.
    >
    >I don't hard code this path in (v:/revamped...). In my
    connection, I
    >have the UNC path to the main database, and this is the
    secondary
    >database.
    >
    >I'm not sure, but I think I need to somehow make MS
    Access link to the
    >database using the UNC path.
    >
    >thanks so much in advance!
    >
    >
    >
    >"JOhn Beschler" <giles@geewhiz.com> wrote in message
    news:<038201c36695$65ed5a00$a501280a@phx.gbl>...
    >> I just tested what I believe is your scenerio and it
    >> worked perfectly.
    >>
    >> DB1: C:\Inetpub\wwwroot\practice.mdb
    >> DB2: C:\Documents and settings\user\my documents\coe.mdb
    >>
    >>
    >> DB1 contains a link to table COE in DB2.
    >>
    >> Here's the ASP code:
    >> strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    >> Source=C:\Inetpub\wwwroot\practice.mdb;Persist Security
    >> Info=False"
    >> Set objConn = Server.CreateObject("ADODB.Connection")
    >> objConn.Open strConn
    >>
    >> Set objRS = Server.CreateObject("ADODB.Recordset")
    >> objRS.Open "COEs", objConn, 3, 3
    >> Response.Write "<table cellpadding=2 cellspacing=0
    >> border=1>" & vbcrlf
    >> Response.Write " <tr>" & vbcrlf
    >> For Each Field In objRS.Fields
    >> Response.Write " <th>" & Field.Name & "</th>" &
    >> vbcrlf
    >> Next
    >> Response.Write " </tr>" & vbcrlf
    >> Do While Not objRS.Eof
    >> Response.Write " <tr>" & vbcrlf
    >> For Each Field In objRS.Fields
    >> Response.Write " <td>" & Field.Value
    & "</td>" &
    >> vbcrlf
    >> Next
    >> Response.Write " </tr>" & vbcrlf
    >> objRS.MoveNext
    >> Loop
    >> Response.Write "</table>" & vbcrlf
    >> strAction = ""
    >>
    >>
    >>
    >> The output is the contents of the COE table as it
    should
    >> be.
    >>
    >> Even tried it with an access database residing on a
    >> completely different computer. Still works.
    >>
    >> I suspect your error is in connecting to the first DB
    not
    >> the linked DB.
    >> Try reading the contents of a table in the main DB and
    see
    >> if you are able to do that. Once you get that working,
    >> accessing the linked table should be nothing more than
    >> changing the table name in the SQL statement.
    >>
    >> HTH,
    >> John
    >>
    >>
    >>
    >>
    >> >-----Original Message-----
    >> >Ok, I tried getting that to work, but the problem now
    >> lies with access.
    >> >
    >> >I didn't specifically hard code in the path to the
    >> secondary database
    >> >(V:/.../Conf.mdb). There is a table in that database
    that
    >> is linked to
    >> >another one (\\server\..\mainDatabase.mdb). So, the
    >> problem lies with I
    >> >link table in Conf.mdb to mainDatabase.mdb, since
    access
    >> uses the "V:/"
    >> >path.
    >> >
    >> >So, any ideas how I can get around that? I tried
    typing
    >> in the UNC path,
    >> >but it just told me that the database couldn't be
    found,
    >> invalid path.
    >> >
    >> >Thanks so much!
    >> >Laura
    >> >
    >> >
    >> >"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote
    in
    >> message news:<esKdVafZDHA.736@TK2MSFTNGP09.phx.gbl>...
    >> >> Drive letters are mapped for the logged on user
    only.
    >> So, just because you
    >> >> logon and map drive v: doesn't mean that it is
    mapped
    >> for *other* users,
    >> >> including IUSR_<machinename>
    >> >>
    >> >> Suggest you use UNC naming instead:
    >> \\server\share\conf.mdb
    >> >>
    >> >> Cheers
    >> >> Ken
    >> >>
    >> >> "Laura" <salamahl@aecl.ca> wrote in message
    >> >>
    news:3b666b7a.0308181117.2f87d097@posting.google.c om...
    >> >> : 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 primary one, and another
    >> one which contains
    >> >> : a table that I need to use. So, I linked the
    table I
    >> need in the
    >> >> : secondary db to the primary database. Now, when I
    >> try to create a
    >> >> : recordset object to it in ASP, I get the following
    >> error:
    >> >> :
    >> >> : Microsoft][ODBC Microsoft Access
    >> Driver] 'V:\DB\Conf.mdb' is not a
    >> >> : valid path. Make sure that the path name is
    spelled
    >> correctly and that
    >> >> : you are connected to the server on which the file
    >> resides.
    >> >> :
    >> >> :
    >> >> : Conf.mdb is the secondary database that contains
    the
    >> table originally.
    >> >> : The connection that I have is to the primary
    >> database.
    >> >> :
    >> >> : I really don't know what's going on, since all the
    >> other tables in the
    >> >> : db (that are not linked from somewhere else) work
    >> perfectly and I can
    >> >> : read information form them through ASP.
    >> >> :
    >> >> : Thanks for any help,
    >> >> : Laura
    >> >.
    >> >
    >.
    >
    John Beschler Guest

  8. #7

    Default Re: problems with linked access tables in ASP

    Ok, how do I change the IWAM_computername permissions? (what does IWAM
    stand for, btw?)

    I changed all the other permissions on both databases to be change/full
    control, but the error still appears.

    thanks, I think we're getting closer!

    Laura


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Laura 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