0

I am using MSAccess in which I have created a table booking and the name of the database is Project. When i run the file it gives following error: The Microsoft Jet database engine cannot open the file 'C:\Users\Yusuf Lappy\Documents\Project.mdb'. It is already opened exclusively by another user, or you need permission to view its data. Below is the code which i have used:

<% 
dim objConn, strConn, objRS
 Set objConn = Server.CreateObject("ADODB.Connection")
 strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
            "C:\Users\Yusuf Lappy\Documents\Project.mdb"
objConn.Open strConn
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open "booking", objConn, 2, 2
objRS.AddNew
objRS("FNAME")=Request.Form("T1")
objRS("LNAME")=Request.Form("T2")
objRS("SOURCE")=Request.Form("D1")
objRS("DEST")=Request.Form("D2")
objRS("DOJ")=Request.Form("T3")
objRS("NOP")=Request.Form("T4")
objRS("MEAL")=Request.Form("R1")
objRS.Update
objRS.Close
%>

I am the admin of my laptop. I am usin Windows 7 Home and IIS 7. Kindly help

YusufSM
  • 45
  • 1
  • 5
  • A very wild guess: Could there be a crashed process that still has a lock on Project.mdb? i.e. have you tried a reboot? – Andre Nov 08 '15 at 15:48
  • I did reboot my system but same. I checked permissions as well and all have full control – YusufSM Nov 08 '15 at 16:11
  • You're missing a piece of information here.. "Below is the code which I have used:" Where are you using this code? Are you running this from another application? Is the program that is running this code 64 bit or 32? Does the application running this code have proper authorization to your documents folder? – Gene Nov 09 '15 at 22:41

0 Answers0