mgosden33
asked on
ASP scripts not running now we are using Access 2010
Hello Experts
I should begin by saying that ASP scripts etc are my real Achilles's heel, so I apologize in advance for my ignorance.
We have an IT classroom where our senior students create fairly basic ASP scripts which run in conjunction with our test IIS server (version 6, running on Server 2003 SP2).
For the past few years this arrangement has worked well and the student's scripts have run OK. We have now upgraded to Office 2010 and their scripts now no longer work.
I believe the error to be based in the fact that IIS doesn't know what a .accdb file is, whereas it knows perfectly well what a .mdb file is.
Is there anywhere in IIS that I need to tell it that .accdb files are to be opened with Access, or to be allowed at all?
With many thanks.
I should begin by saying that ASP scripts etc are my real Achilles's heel, so I apologize in advance for my ignorance.
We have an IT classroom where our senior students create fairly basic ASP scripts which run in conjunction with our test IIS server (version 6, running on Server 2003 SP2).
For the past few years this arrangement has worked well and the student's scripts have run OK. We have now upgraded to Office 2010 and their scripts now no longer work.
I believe the error to be based in the fact that IIS doesn't know what a .accdb file is, whereas it knows perfectly well what a .mdb file is.
Is there anywhere in IIS that I need to tell it that .accdb files are to be opened with Access, or to be allowed at all?
With many thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi, the most probable cause of your problem is inside the script. From your description, I see two solutions:
first and easiest is to use the mdb database format when saving the database in access 2010.
Second is to check the script itself and see what style of dataaccess is used in it (ODBC, ADO with OLEDB provider, etc.) and adjust the connection part of the ASP script.
Other thing is to tell IIS webserver how to handle the accdb filetypes. When you open the IIS snap-in, (start, run, then type "inetmrg.exe" without quotes), right-click the local computer object in the left tree and choose properties. In the dialogbox, click the "MIME types" button and check if you see the .accdb filetype in the list. It should be there with mime type "application/msaccess".
hope it helps, good luck
first and easiest is to use the mdb database format when saving the database in access 2010.
Second is to check the script itself and see what style of dataaccess is used in it (ODBC, ADO with OLEDB provider, etc.) and adjust the connection part of the ASP script.
Other thing is to tell IIS webserver how to handle the accdb filetypes. When you open the IIS snap-in, (start, run, then type "inetmrg.exe" without quotes), right-click the local computer object in the left tree and choose properties. In the dialogbox, click the "MIME types" button and check if you see the .accdb filetype in the list. It should be there with mime type "application/msaccess".
hope it helps, good luck
ASKER
@Celazkon
Thank you for that. Unfortunately the IIS is configured exactly as you suggest, which is a shame as this looked to be exactly what I was after.
I will check with the students to see if the first half of your suggestion (with regards to the data access) is workable.
Thank you for that. Unfortunately the IIS is configured exactly as you suggest, which is a shame as this looked to be exactly what I was after.
I will check with the students to see if the first half of your suggestion (with regards to the data access) is workable.
ASKER
This is the test script we are using:
-------------------------- ---------- ---------- ---------- -
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<%
'read the data from the form and place in temporary variables
tmpdepartment=request.form ("departme nt")
tmpname=request.form("name ")
'Open database using standard connection
dim orseof
set db=server.createobject("ad odb.connec tion")
set orseof=server.createobject ("adodb.re cordset")
'New Connection
db.open "DRIVER={Microsoft Access Driver (*.accdb)}; DBQ=" & Server.MapPath("sample.acc db")
'Old Connection
'db.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sample.mdb ")
'run SQL update statement - add new record
dim strsql
strSQL = "INSERT INTO Tperson"
strsql=strsql+"(person,dep artment)Va lues"
strsql=strsql+"('"&tmpname &"','"&tmp department &"')"
orseof.Open strSQL, db
'orseof.close
response.write("Thank you for submitting the information, we will get back to you as soon as possible")
%>
<body>
</body>
</html>
-------------------------- ---------- ---------- ---------- -
Does this mean that the script is set correctly as it mentions .accdb files?
--------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<%
'read the data from the form and place in temporary variables
tmpdepartment=request.form
tmpname=request.form("name
'Open database using standard connection
dim orseof
set db=server.createobject("ad
set orseof=server.createobject
'New Connection
db.open "DRIVER={Microsoft Access Driver (*.accdb)}; DBQ=" & Server.MapPath("sample.acc
'Old Connection
'db.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sample.mdb
'run SQL update statement - add new record
dim strsql
strSQL = "INSERT INTO Tperson"
strsql=strsql+"(person,dep
strsql=strsql+"('"&tmpname
orseof.Open strSQL, db
'orseof.close
response.write("Thank you for submitting the information, we will get back to you as soon as possible")
%>
<body>
</body>
</html>
--------------------------
Does this mean that the script is set correctly as it mentions .accdb files?
Check the kb article:
http://support.microsoft.com/kb/283874/en-us
In your case, only the connection part is important for you.
http://support.microsoft.com/kb/283874/en-us
In your case, only the connection part is important for you.
This page says you need a different driver: http://support.microsoft.com/kb/283874
"Change the Provider to "Microsoft.ACE.OLEDB.12.0" for Access 2007 ACCDB databases."
"Change the Provider to "Microsoft.ACE.OLEDB.12.0"
ASKER
@Dave
Is that a driver on the server side, or the client side?
Is that a driver on the server side, or the client side?
ASKER
We have now amended the script slightly (by someone who knows more about that sort of thing than I do...) and we are getting a different error:
"Could not find installable ISAM
Error 80004005"
Does this shed any more light on things?
"Could not find installable ISAM
Error 80004005"
Does this shed any more light on things?
ASKER
The problem has been solved.
Our original connection script was:
strConnection = "Provider=Microsoft.ACE.OL EDB.14.0; DBQ=" & Server.MapPath("sample.acc db")
'Provider=Microsoft.ACE.OL EDB.12.0;D ata Source=C:\myFolder\myAcces s2007file. accdb;Pers ist Security Info=False;
And we are now using:
strConnection = "Driver={microsoft access driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("sample.acc db")
Which is working. Thank you for all the helpful suggestions, they were much appreciated.
Our original connection script was:
strConnection = "Provider=Microsoft.ACE.OL
'Provider=Microsoft.ACE.OL
And we are now using:
strConnection = "Driver={microsoft access driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("sample.acc
Which is working. Thank you for all the helpful suggestions, they were much appreciated.
Driver is on the server side, generally, it is a DATA access driver.
Download the driver from:
http://www.microsoft.com/download/en/details.aspx?id=13255
and install it on server. Then change the data provider driver in the script and you should be okay.
Download the driver from:
http://www.microsoft.com/download/en/details.aspx?id=13255
and install it on server. Then change the data provider driver in the script and you should be okay.
ASKER
The config information there seems to require specifying a specific location for a single .accdb file, whereas our students have them in various folders. How would I allow for that?
Thanks.