Hello,
This is my first post on this forum. I've got some problems on my classic ASP code and I have partially resolved. But there is still an error. It occurs everytime I try to add or update some field in my Access 2003 database. The ASP codes work well on WindowsXP + IIS 5 but when I transfer them to Windows Vista Ultimate + IIS 7, the codes always generate this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
I have tried:
- change permission of IIS_IUSR on the Access database file and folder to had full control
- turn off read-only of the folder's and file's property
- %windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/applicationPools -applicationPoolDefaults.processModel.loadUserprofile:false
and it's still not work
My code :
<%
prefix = request.Form("prefix")
ptName = request.Form("name")
ptSurname = request.Form("surname")
ptAge = request.Form("age")
ptHomeNo = request.Form("homeNo")
ptMoo = request.Form("moo")
ptTambon = request.Form("tambon")
ptAmpue = request.Form("ampue")
ptChangwat = request.Form("changwat")
set con = server.CreateObject("ADODB.Connection")
con.open "myClinic" 'my system DSN
set rec = server.CreateObject("ADODB.Recordset")
rec.open "ptData", con, 1, 3
rec.AddNew
rec("prefix") = prefix
rec("ptName") = ptName
rec("ptSurname") = ptSurname
rec("ptAge") = ptAge
rec("ptHouseNum") = ptHomeNo
rec("ptMoo") = ptMoo
rec("ptTambon") = ptTambon
rec("ptAmpue") = ptAmpue
rec("ptChangwat") = ptChangwat
rec.Update
rec.close
set rec = nothing
con.close
set con = nothing
%>
Thanks a lot for every comment!!