Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Problem connecting to Access database

Problem connecting to Access database

Scheduled Pinned Locked Moved Web Development
databasehelpsysadminwindows-adminquestion
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris LaQuerre
    wrote on last edited by
    #1

    I am getting a Server 500 error whenever I try to connect to an Access DB. I've used the code below in an Intranet test environment and it works fine. However, when I moved this over to our external Intranet site, I get the server error. (This is the first time that I've tried to connect to a DB on this server. I can run regular ASP scripts fine). Does anyone have any clues about why this would happen? Does anything need to be set up on this server to allow it to connect to an Access DB? The web server that we are trying to get this running on is Microsoft-IIS/5.0 on Windows 2000. Here is the code that I am using to connect: <% @Language = VBScript %> <% Dim MyConn, SQL, RS, id Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test.mdb") SQL = "SELECT * From TEST;" Set RS = MyConn.Execute(SQL) %> <% While Not RS.EOF %> <% RS.MoveNext Wend %> <%= RS("DATA") %> <% RS.Close MyConn.Close Set RS = Nothing Set MyConn = Nothing %> Chris LaQuerre eBusiness Consultant

    P R Z 3 Replies Last reply
    0
    • C Chris LaQuerre

      I am getting a Server 500 error whenever I try to connect to an Access DB. I've used the code below in an Intranet test environment and it works fine. However, when I moved this over to our external Intranet site, I get the server error. (This is the first time that I've tried to connect to a DB on this server. I can run regular ASP scripts fine). Does anyone have any clues about why this would happen? Does anything need to be set up on this server to allow it to connect to an Access DB? The web server that we are trying to get this running on is Microsoft-IIS/5.0 on Windows 2000. Here is the code that I am using to connect: <% @Language = VBScript %> <% Dim MyConn, SQL, RS, id Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test.mdb") SQL = "SELECT * From TEST;" Set RS = MyConn.Execute(SQL) %> <% While Not RS.EOF %> <% RS.MoveNext Wend %> <%= RS("DATA") %> <% RS.Close MyConn.Close Set RS = Nothing Set MyConn = Nothing %> Chris LaQuerre eBusiness Consultant

      P Offline
      P Offline
      palbano
      wrote on last edited by
      #2

      >> Does anything need to be set up on this server to allow it to connect to an Access DB? >> "DRIVER={Microsoft Access Driver (*.mdb)}; u mean besides the driver ur telling it to use and MDAC for ADO? I don't think so. does that help?

      "No matter where you go, there your are..." - Buckaoo Banzi

      -pete

      1 Reply Last reply
      0
      • C Chris LaQuerre

        I am getting a Server 500 error whenever I try to connect to an Access DB. I've used the code below in an Intranet test environment and it works fine. However, when I moved this over to our external Intranet site, I get the server error. (This is the first time that I've tried to connect to a DB on this server. I can run regular ASP scripts fine). Does anyone have any clues about why this would happen? Does anything need to be set up on this server to allow it to connect to an Access DB? The web server that we are trying to get this running on is Microsoft-IIS/5.0 on Windows 2000. Here is the code that I am using to connect: <% @Language = VBScript %> <% Dim MyConn, SQL, RS, id Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test.mdb") SQL = "SELECT * From TEST;" Set RS = MyConn.Execute(SQL) %> <% While Not RS.EOF %> <% RS.MoveNext Wend %> <%= RS("DATA") %> <% RS.Close MyConn.Close Set RS = Nothing Set MyConn = Nothing %> Chris LaQuerre eBusiness Consultant

        R Offline
        R Offline
        Ray Cassick
        wrote on last edited by
        #3

        Try going into your browser configuration and turning off the 'freindly errors' option. You should get more back than a simple '500 error' then.


        Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
        George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


        C 1 Reply Last reply
        0
        • R Ray Cassick

          Try going into your browser configuration and turning off the 'freindly errors' option. You should get more back than a simple '500 error' then.


          Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
          George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


          C Offline
          C Offline
          Chris LaQuerre
          wrote on last edited by
          #4

          OK, here is the error that I get... Any clue what this means??? Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x7d8 Thread 0x1b0 DBC 0x2e7ecc4 Jet'. Chris LaQuerre Internet Technologies Consultant

          R Richard DeemingR 2 Replies Last reply
          0
          • C Chris LaQuerre

            OK, here is the error that I get... Any clue what this means??? Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x7d8 Thread 0x1b0 DBC 0x2e7ecc4 Jet'. Chris LaQuerre Internet Technologies Consultant

            R Offline
            R Offline
            Ray Cassick
            wrote on last edited by
            #5

            Damn, that one... I have seen this before, and unfortunately have never been able to nail it down to exactly what causes it. I noticed that it seemed to happen more frequently if I sent up a new copy of my database after I had edited locally. A few things that I have done to get past it: - Moved from a DSNless connection to using a DSN - Moved from Access to SQL :) - Stopped making additions to my database locally and sending up a new DB. I instead performed all my maintenance (record additions and deletions) via ASP pages. Sorry I can’t help more. If you do a simple search on Google for that number you will see that there are many others out there with the same problem.


            Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
            George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


            1 Reply Last reply
            0
            • C Chris LaQuerre

              OK, here is the error that I get... Any clue what this means??? Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x7d8 Thread 0x1b0 DBC 0x2e7ecc4 Jet'. Chris LaQuerre Internet Technologies Consultant

              Richard DeemingR Offline
              Richard DeemingR Offline
              Richard Deeming
              wrote on last edited by
              #6

              Have a look at http://support.microsoft.com/default.aspx?scid=kb;en-us;295297[^]


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

              1 Reply Last reply
              0
              • C Chris LaQuerre

                I am getting a Server 500 error whenever I try to connect to an Access DB. I've used the code below in an Intranet test environment and it works fine. However, when I moved this over to our external Intranet site, I get the server error. (This is the first time that I've tried to connect to a DB on this server. I can run regular ASP scripts fine). Does anyone have any clues about why this would happen? Does anything need to be set up on this server to allow it to connect to an Access DB? The web server that we are trying to get this running on is Microsoft-IIS/5.0 on Windows 2000. Here is the code that I am using to connect: <% @Language = VBScript %> <% Dim MyConn, SQL, RS, id Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test.mdb") SQL = "SELECT * From TEST;" Set RS = MyConn.Execute(SQL) %> <% While Not RS.EOF %> <% RS.MoveNext Wend %> <%= RS("DATA") %> <% RS.Close MyConn.Close Set RS = Nothing Set MyConn = Nothing %> Chris LaQuerre eBusiness Consultant

                Z Offline
                Z Offline
                Zeeshan Mehmood
                wrote on last edited by
                #7

                Hi Chris, I know what is the solution of this problem. Your code is absolutely right...no errors in your code... I suggest that you can host your web pages on "http://www.brinkster.com" and then check it because some "Free Web Space" provider don't give the permission of using database. You simple make an account on brinkster and then check it out. For more information about Web Development Contact me (zeeshan_kyo@hotmail.com) also you can see a live version of my brinkster account at "http://www24.brinkster.com/zeeshan123/zeeguest\_view.asp" I think it's enough.... Zeeshan Mehmood

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups