Operation must use an updateable query Error!!!

G

Guest

Hi
I am getting the 'Operation must use an updateable query' error when i am trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at the same time i also changed the settings in machinge.config file from 'machine' to 'SYSTEM'. Any other ideas of why it gives that error, this is the code

Dim sPath As String = Server.MapPath("db/dbname.mdb"
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;
sConn +="DATA Source=" & sPath & ";
sConn += "Persist Security Info=False
oConn = New OleDbConnection(sConn

strinsert="insert into dattbl_movies(type,genre,title,rating) values(?,?,?,?)
cmdinsert=New OledbCOmmand(strinsert,oConn)
cmdinsert.Parameters.Add("@type",rdtype.SelectedValue
cmdinsert.Parameters.Add("@genre",txtgenre.text
cmdinsert.Parameters.Add("@title",txttitle.text
cmdinsert.Parameters.Add("@rating",txtrating.text)
oConn.Open(
cmdinsert.ExecuteNonQuery(
oConn.Close(

Thanks in advance

Ken
 
C

Curt J Raddatz

99 times out of 100 it means someone has the database open exclusively or
someone has that table open in design view. Happens to me all the time when
I'm making changes to the database and trying to test them quickly.

Ken said:
Hi,
I am getting the 'Operation must use an updateable query' error when i am
trying to insert some data into the access db!!
I have checked for the permissions, all the permissions are ok, at the
same time i also changed the settings in machinge.config file from 'machine'
to 'SYSTEM'. Any other ideas of why it gives that error, this is the code:
 
G

Guest

Also, can you successfully do a select (i.e. read operation) from the database

And check out: http://aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=10

Tim Stal


----- Curt J Raddatz wrote: ----

99 times out of 100 it means someone has the database open exclusively o
someone has that table open in design view. Happens to me all the time whe
I'm making changes to the database and trying to test them quickly

Ken said:
Hi
I am getting the 'Operation must use an updateable query' error when i a
trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at th
same time i also changed the settings in machinge.config file from 'machine
to 'SYSTEM'. Any other ideas of why it gives that error, this is the code
 
G

Guest

Thanks Curt for your reply, but the database is not open in design view nor exclusively(there should be a lock file if its open exclusively, but i could not see it) :-

Ke


----- Curt J Raddatz wrote: ----

99 times out of 100 it means someone has the database open exclusively o
someone has that table open in design view. Happens to me all the time whe
I'm making changes to the database and trying to test them quickly

Ken said:
Hi
I am getting the 'Operation must use an updateable query' error when i a
trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at th
same time i also changed the settings in machinge.config file from 'machine
to 'SYSTEM'. Any other ideas of why it gives that error, this is the code
 
S

S. Justin Gengo

Ken,

This is almost always a permissions error. There are some details to
permissions that could be making it not work. First you have to be certain
of which account is actually trying to get to the database. (i.e. Are you
using impersonate="true" in your web.config file? If you are then make sure
the account being impersonated has read/write permissions on the access
database.)

Here's a reference to another forum's thread that contains two other
possible permissions issues:
http://www.stardeveloper.com/articles/thread.html?tid=879

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


Ken said:
Hi,
I am getting the 'Operation must use an updateable query' error when i am
trying to insert some data into the access db!!
I have checked for the permissions, all the permissions are ok, at the
same time i also changed the settings in machinge.config file from 'machine'
to 'SYSTEM'. Any other ideas of why it gives that error, this is the code:
 
G

Guest

Thanks everyone, i followed the links, and it was indeed a permissions problem(NTFs-WIn XP) was hiding it from me the necessary details, i changed the permissions and everything seems to be working fine now. Thanks again

Ke


----- S. Justin Gengo wrote: ----

Ken

This is almost always a permissions error. There are some details t
permissions that could be making it not work. First you have to be certai
of which account is actually trying to get to the database. (i.e. Are yo
using impersonate="true" in your web.config file? If you are then make sur
the account being impersonated has read/write permissions on the acces
database.

Here's a reference to another forum's thread that contains two othe
possible permissions issues
http://www.stardeveloper.com/articles/thread.html?tid=87

--
Sincerely

S. Justin Gengo, MC
Web Developer / Programme

Free code library at
www.aboutfortunate.co

"Out of chaos comes order.
Nietzch


Ken said:
Hi
I am getting the 'Operation must use an updateable query' error when i a
trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at th
same time i also changed the settings in machinge.config file from 'machine
to 'SYSTEM'. Any other ideas of why it gives that error, this is the code
 
H

Hans Kesting

Ken said:
Hi,
I am getting the 'Operation must use an updateable query' error when i am
trying to insert some data into the access db!!
I have checked for the permissions, all the permissions are ok, at the
same time i also changed the settings in machinge.config file from 'machine'
to 'SYSTEM'.

Check the permissions (readonly-attribute) of both the mdb file and the
directory it is in.
You get this error when the database (mdb-file) is readonly or access can't
create the
ldb (?) - file.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top