Microsoft JET Database Engine (0x80040E09) Cannot update. Database or object is read-only

sigh!

Ok

why am I getting this error message!!!

     set oRs = oConn.Execute("select * into dbo.list from list.csv")


is the line referred to by the error message.

I have tried setting the folder permissions and they are set to full control

any other ideas??


the whole page only contains

     dim oConn, oRs
     set oConn = Server.CreateObject("ADODB.Connection")
     Call oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\InetPub\wwwroot\Alchemy_site\;Extended Properties=""text;HDR=No;FMT=Delimited""")

     set oRs = oConn.Execute("select * into dbo.list from list.csv")
abenbowAsked:
Who is Participating?
 
sajuksCommented:
ms-sql database ?
wouldnt ur connect string be something like
strConnString = "driver={SQL Server};server=YOUR-SERVER-NAME;uid=USERID;pwd=PASSWORD;database=DATABASE-NAME"

from ur code i was assuming u've a csv file as db so thats why i asked you if that csv file was read only.
0
 
sajuksCommented:
check your database file and see that if the file is read only...right click on the database file and make sure that read only is not checked.
and i assume that you've set the permission on the folder/file where the database is located ?(just re confirming )

0
 
sajuksCommented:

Right click on .MDB file and from permission make sure you have IUSER_Machine_Name user added with read/write Permissions alongwith readonly being not checked.

or
strQRY="select * into dbo.list from list.csv"
rs.Open(strQRY),oConn,3,3

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
ajaikumarrCommented:
Hai,

What r u trying to do? Seems you have not mentioned the database names on datasource.

Bye
Ajai
0
 
abenbowAuthor Commented:
hi

its a ms-sql database.

the folder containg the database is not readonly, everyone has full control

the folders containg the asp code are all set to full control

any where else I can look??
0
 
ajaikumarrCommented:
0
 
abenbowAuthor Commented:
ok

i understand what I'm doing wrong and why I'm getting the error

this works

<%
     dim oRs
     set oConn = Server.CreateObject("ADODB.Connection")
     Call oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\InetPub\wwwroot\Alchemy_site\;Extended Properties=""text;HDR=No;FMT=Delimited""")

     set oRs = oConn.Execute("select * into list3.csv from list.csv")
 
%>


of course what its really doing is copying the csv file from list.csv to list3.csv

What I was attempting to do was to read list.csv into a table in my ms-sql database called list.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.