Solved

Microsoft JET Database Engine error '80004005'

Posted on 2001-07-19
12
259 Views
Last Modified: 2007-12-19
When I want to insert a record in the access database, available online.  I got following message.

"Microsoft JET Database Engine error '80004005'
Operation must use an updateable query"

The code, i m using is as follows...

<%
set conn=Server.Createobject("ADODB.Connection")
conn.Provider="Microsoft.jet.OLEDB.4.0"
conn.open Server.MapPath("\")&"\test.mdb"
conn.execute("insert into newsletters values('test','test')")
conn.close
set conn=nothing
%>

This works very well on local configurations.  But problem is with the database available on my ISP's web server.
But when i wanna retrieve any record from the database it is accebile, but the problem is with insertion only.
0
Comment
Question by:helloaamir
  • 3
  • 3
  • 2
  • +4
12 Comments
 
LVL 7

Expert Comment

by:weesiong
ID: 6297646
helloaamir,

conn.execute("insert into newsletters (yourfieldname, yourfieldname) values('test','test')")

Regards,
Wee Siong
0
 
LVL 1

Expert Comment

by:zeheb
ID: 6297689
I'm not sure it will solve your problem but it probably worth to try:

if for instance you have 2 field in your database
named "field1" and "field2" and you wish to assign the value "Field1 Value" to field1 and "Field2 Value" to field2
that your query may look like this:

INSERT INTO newletters(field1, field2) VALUES('Field1 Value', 'Field2 Value');

I hope it was helpfull -)

zeheb
0
 
LVL 1

Expert Comment

by:zeheb
ID: 6297702
I'm not sure it will solve your problem but it probably worth to try:

if for instance you have 2 field in your database
named "field1" and "field2" and you wish to assign the value "Field1 Value" to field1 and "Field2 Value" to field2
that your query may look like this:

INSERT INTO newletters(field1, field2) VALUES('Field1 Value', 'Field2 Value');

I hope it was helpfull -)

zeheb
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Expert Comment

by:systemop
ID: 6297706
Try to use this


<%
db = Server.MapPath("databasepath/test.mdb")
conn2 = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &db
set conn=Server.Createobject("ADODB.Connection")
conn.execute("insert into newsletters values('test','test')")
conn.close
set conn=nothing
%>


SyS...
0
 
LVL 1

Expert Comment

by:zeheb
ID: 6297707
Opps I accidently post my commant twice
Sorry
0
 
LVL 14

Expert Comment

by:puranik_p
ID: 6297714
your query is fine.
problem is with your newletter table.
just check it's structure.
is it bound by some relationships?
better still, post the structure.
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6297944
Everything is fine.. this is a permission issue.. contact your isp administrator and tell him to grant the IUSR write/change permission on the database..
0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6297951
Try to add other data as "test", "test".

Maybe you have defined some Primary Keys in your database, and then you tried to add (via an insert) these values again which fails of course, since primary keys are unique it doesn't accept this.

If this is the problem, tell us and we provide some solutions for that also.
0
 

Author Comment

by:helloaamir
ID: 6298059
Thanks for replying on my question, but just see that i m saying that its working well on my local configurations. It means there isn't any problem with primary key, permissions or with the query.
Zeheb and weesiong as for as i think As i have 2 fields in the database so i dont need to write the names of fields.
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6298222
Hello.. operation must be an updatable query this error is given when the database is only read only! when you upkloaded the mdb to the isp it inherited the permissions from its parent directory that are by default READ only!!! stop turning in around..
0
 
LVL 20

Accepted Solution

by:
Silvers5 earned 80 total points
ID: 6298227
...this is why you can only read but not write! permissions on your local server are not sent to the ISP web server.. (otherwise all the web servers will be hacked..
0
 

Author Comment

by:helloaamir
ID: 6298405
Thanks Silvers5, U got the point in my question, other were only telling me about the quieries...
Now the problem is solved.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now