473,503 Members | 12,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Operation must use an updateable query.

Al
Hi
I have used the following code to update Access 97 code with no problem but
when moved it into ASP.Net as WebMethod i get "Operation must use an
updateable query"
I think it has to do with write permission but not sure how to fix it. Any
suggestion will be appreciated.
AL
code===============
loCommand = New OleDbCommand
loCommand.Connection = MyConnection

loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
'Seattle' WHERE ClaimtID = 40"

loCommand.Connection.Open()
loCommand.ExecuteNonQuery()
loCommand.Connection.Close()
Nov 21 '05 #1
8 1232
In the Properties window of the .mdb, look in the Security tab. Try giving
the IUSR_MACHINE account or the guest account write permission. Add the
account to the list if necessary.

"Al" wrote:
Hi
I have used the following code to update Access 97 code with no problem but
when moved it into ASP.Net as WebMethod i get "Operation must use an
updateable query"
I think it has to do with write permission but not sure how to fix it. Any
suggestion will be appreciated.
AL
code===============
loCommand = New OleDbCommand
loCommand.Connection = MyConnection

loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
'Seattle' WHERE ClaimtID = 40"

loCommand.Connection.Open()
loCommand.ExecuteNonQuery()
loCommand.Connection.Close()

Nov 21 '05 #2
Here is some more detail:

http://support.microsoft.com/default...3BDA%3Bq175168

"Al" wrote:
Hi
I have used the following code to update Access 97 code with no problem but
when moved it into ASP.Net as WebMethod i get "Operation must use an
updateable query"
I think it has to do with write permission but not sure how to fix it. Any
suggestion will be appreciated.
AL
code===============
loCommand = New OleDbCommand
loCommand.Connection = MyConnection

loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
'Seattle' WHERE ClaimtID = 40"

loCommand.Connection.Open()
loCommand.ExecuteNonQuery()
loCommand.Connection.Close()

Nov 21 '05 #3
Al
Hi Charlie,
the source is in Access 97 and I cannot convert it to 2000. Is there any way
i can do this programmatically?
Thanks
Al

"Charlie" wrote:
In the Properties window of the .mdb, look in the Security tab. Try giving
the IUSR_MACHINE account or the guest account write permission. Add the
account to the list if necessary.

"Al" wrote:
Hi
I have used the following code to update Access 97 code with no problem but
when moved it into ASP.Net as WebMethod i get "Operation must use an
updateable query"
I think it has to do with write permission but not sure how to fix it. Any
suggestion will be appreciated.
AL
code===============
loCommand = New OleDbCommand
loCommand.Connection = MyConnection

loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
'Seattle' WHERE ClaimtID = 40"

loCommand.Connection.Open()
loCommand.ExecuteNonQuery()
loCommand.Connection.Close()

Nov 21 '05 #4
You should be able to find a very simple solution to this. If the database
can be updated in the windows environment, but not a web environment, it
should be a simple matter of setting a web permission. Can you get a SELECT
statement to work? What about an INSERT?

If you right click on the .mdb file (make sure it is closed), you should see
a Security tab. The Security tab should be there for any file. Did you do
that? You may also have to set permissions on folders.

I don't know of a way to do it programatically.

"Al" wrote:
Hi Charlie,
the source is in Access 97 and I cannot convert it to 2000. Is there any way
i can do this programmatically?
Thanks
Al

"Charlie" wrote:
In the Properties window of the .mdb, look in the Security tab. Try giving
the IUSR_MACHINE account or the guest account write permission. Add the
account to the list if necessary.

"Al" wrote:
Hi
I have used the following code to update Access 97 code with no problem but
when moved it into ASP.Net as WebMethod i get "Operation must use an
updateable query"
I think it has to do with write permission but not sure how to fix it. Any
suggestion will be appreciated.
AL
code===============
loCommand = New OleDbCommand
loCommand.Connection = MyConnection

loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
'Seattle' WHERE ClaimtID = 40"

loCommand.Connection.Open()
loCommand.ExecuteNonQuery()
loCommand.Connection.Close()

Nov 21 '05 #5
Al
Charlie,
I can use Select with no problem but Insert and Update will fail in web
services but not in windows.
i have right click on the .mdb and it is not set to RedOnly. There is no
Security in richt click menu.

"Charlie" wrote:
You should be able to find a very simple solution to this. If the database
can be updated in the windows environment, but not a web environment, it
should be a simple matter of setting a web permission. Can you get a SELECT
statement to work? What about an INSERT?

If you right click on the .mdb file (make sure it is closed), you should see
a Security tab. The Security tab should be there for any file. Did you do
that? You may also have to set permissions on folders.

I don't know of a way to do it programatically.

"Al" wrote:
Hi Charlie,
the source is in Access 97 and I cannot convert it to 2000. Is there any way
i can do this programmatically?
Thanks
Al

"Charlie" wrote:
In the Properties window of the .mdb, look in the Security tab. Try giving
the IUSR_MACHINE account or the guest account write permission. Add the
account to the list if necessary.

"Al" wrote:

> Hi
> I have used the following code to update Access 97 code with no problem but
> when moved it into ASP.Net as WebMethod i get "Operation must use an
> updateable query"
> I think it has to do with write permission but not sure how to fix it. Any
> suggestion will be appreciated.
> AL
> code===============
> loCommand = New OleDbCommand
> loCommand.Connection = MyConnection
>
> loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
> 'Seattle' WHERE ClaimtID = 40"
>
> loCommand.Connection.Open()
> loCommand.ExecuteNonQuery()
> loCommand.Connection.Close()
>
>

Nov 21 '05 #6
Al
Thanks Charlie, It is working can believe it was so simple i make the folder
shared and gave users premising to modify and it fix the problem.

"Charlie" wrote:
You should be able to find a very simple solution to this. If the database
can be updated in the windows environment, but not a web environment, it
should be a simple matter of setting a web permission. Can you get a SELECT
statement to work? What about an INSERT?

If you right click on the .mdb file (make sure it is closed), you should see
a Security tab. The Security tab should be there for any file. Did you do
that? You may also have to set permissions on folders.

I don't know of a way to do it programatically.

"Al" wrote:
Hi Charlie,
the source is in Access 97 and I cannot convert it to 2000. Is there any way
i can do this programmatically?
Thanks
Al

"Charlie" wrote:
In the Properties window of the .mdb, look in the Security tab. Try giving
the IUSR_MACHINE account or the guest account write permission. Add the
account to the list if necessary.

"Al" wrote:

> Hi
> I have used the following code to update Access 97 code with no problem but
> when moved it into ASP.Net as WebMethod i get "Operation must use an
> updateable query"
> I think it has to do with write permission but not sure how to fix it. Any
> suggestion will be appreciated.
> AL
> code===============
> loCommand = New OleDbCommand
> loCommand.Connection = MyConnection
>
> loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
> 'Seattle' WHERE ClaimtID = 40"
>
> loCommand.Connection.Open()
> loCommand.ExecuteNonQuery()
> loCommand.Connection.Close()
>
>

Nov 21 '05 #7
On Sat, 4 Dec 2004 12:07:02 -0800, "Al" <Al@discussions.microsoft.com> wrote:

¤ Hi
¤ I have used the following code to update Access 97 code with no problem but
¤ when moved it into ASP.Net as WebMethod i get "Operation must use an
¤ updateable query"
¤ I think it has to do with write permission but not sure how to fix it. Any
¤ suggestion will be appreciated.
¤ AL
¤ code===============
¤ loCommand = New OleDbCommand
¤ loCommand.Connection = MyConnection
¤
¤ loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
¤ 'Seattle' WHERE ClaimtID = 40"
¤
¤ loCommand.Connection.Open()
¤ loCommand.ExecuteNonQuery()
¤ loCommand.Connection.Close()
¤

If you're not using impersonation for your web application then you need to provided sufficient
permissions (Read, Update, Delete, Create) for the local ASPNET account to the folder where the
Access database is located.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #8
On Sat, 4 Dec 2004 12:07:02 -0800, "Al" <Al@discussions.microsoft.com> wrote:

¤ Hi
¤ I have used the following code to update Access 97 code with no problem but
¤ when moved it into ASP.Net as WebMethod i get "Operation must use an
¤ updateable query"
¤ I think it has to do with write permission but not sure how to fix it. Any
¤ suggestion will be appreciated.
¤ AL
¤ code===============
¤ loCommand = New OleDbCommand
¤ loCommand.Connection = MyConnection
¤
¤ loCommand.CommandText = "UPDATE [Claim Form Table] SET ClaimCity =
¤ 'Seattle' WHERE ClaimtID = 40"
¤
¤ loCommand.Connection.Open()
¤ loCommand.ExecuteNonQuery()
¤ loCommand.Connection.Close()
¤

If you're not using impersonation for your web application then you need to provided sufficient
permissions (Read, Update, Delete, Create) for the local ASPNET account to the folder where the
Access database is located.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
902
by: Tom wilson | last post by:
This is driving me nuts. I'm trying to update an Excel spreadsheet using ADO.Net and Oledb in VB.Net. The connection is open, the adapter is connected and the dataset is loaded. Here's the code...
8
1399
by: Tom wilson | last post by:
This is driving me nuts. I'm trying to update an Excel spreadsheet using ADO.Net and Oledb in VB.Net. The connection is open, the adapter is connected and the dataset is loaded. Here's the code...
8
2987
by: Jim in Arizona | last post by:
I've been using an example out of a book to be able to edit the rows in a database. I am getting the following error: ========================================================...
1
2741
by: pavya | last post by:
Hi, I have developed one Web application. At that time my system had a FAT file system on it and this application worked properly. But now i have converted FAT file system to NTFS file system and...
3
5522
by: rinu911 | last post by:
hi all I am tring to insert a values to a table by checking if the value is there in the table already but it gives me this error "Query input must contain at least one table or query" ...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.