Solved

Microsoft JET Database Engine error '80004005'

Posted on 2001-07-19
12
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to show result of a NULL value at random? 33 60
Save ms data to server side. 19 64
Making Table Thru ASP Response.write 5 38
Table header must be on top 2 57
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…
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/…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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