ACCESS DATABASE CONNECTION PROBLEM

Status
Not open for further replies.

Aseem Nasnodkar

In the zone
I am trying to connet to my access database thro ASP. This code worked earlier on my comp, but after re-installing OS it dsnt. I can read records but cannot add records.
It gives foll error:
Code:
Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.

My connection strings are as follows:

Code:
<%
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
              Server.MapPath("/username/database/query.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strConnect
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.open "source",objConn,2,3
objRS.AddNew
objRS("name") = Request.Form("fname")
objRS("email") = Request.Form("femail")
objRS("query") = Request.Form("fquery")
objRS.Update
objRS.close : objConn.close
%>


I dont think anthing is wrong with the code as It worked earlier.
May be the required driver is missing. Please help!
 

Deep

Version 2.0
I do not know ASP but from the error you are getting, it looks like permission problem to some folder..

checkout this thread:

*forums.aspfree.com/archive/t-27266

or this

Regards
Deep
 

tuxfan

Technomancer
If the same code was working earlier, then there is not need to touch it simply because OS was re-installed.

Just check the attributes/properties of the file. It may be read only. You must have taken the backup on a CD and copied back from there on HD after OS installtion. So this must have made the files as read only.
 
Status
Not open for further replies.
Top Bottom