Solved

Microsoft JET Database Engine error '80004005'

Posted on 2001-07-19
12
255 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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

21 Experts available now in Live!

Get 1:1 Help Now