Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft JET Database Engine error '80004005'

Posted on 2001-07-19
12
Medium Priority
?
268 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
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:Michel Sakr
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:Michel Sakr
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:
Michel Sakr earned 320 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 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