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("@dotnet.itags.org.type",rdtype.SelectedValue
cmdinsert.Parameters.Add("@dotnet.itags.org.genre",txtgenre.text
cmdinsert.Parameters.Add("@dotnet.itags.org.title",txttitle.text
cmdinsert.Parameters.Add("@dotnet.itags.org.rating",txtrating.text)
oConn.Open(
cmdinsert.ExecuteNonQuery(
oConn.Close(
Thanks in advance
Ken99 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" <anonymous@.discussions.microsoft.com> wrote in message
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com...
> 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
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" <anonymous@.discussions.microsoft.com> wrote in messag
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com..
> 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
>> 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
>> Ke
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" <anonymous@.discussions.microsoft.com> wrote in messag
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com..
> 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
>> 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
>> Ke
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/articl...ad.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" <anonymous@.discussions.microsoft.com> wrote in message
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com...
> 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
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/articl...ead.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" <anonymous@.discussions.microsoft.com> wrote in messag
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com..
> 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
>> 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
>> Ke
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:EDA213DA-8242-476A-86AB-A87D2996EB01@.microsoft.com...
> 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
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment