Problem connecting to Access database
-
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 -
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>> 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
-
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 ConsultantTry 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."
-
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."
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 -
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 ConsultantDamn, 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."
-
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 ConsultantHave 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
-
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 ConsultantHi 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