Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

"Operation must be an updatable query"

I know this error is quite common, but I find myself unable to make it work online - while on my local machine it works perfectly. The query is the following:

------------------

UPDATE tblRooms SET [Active] = false WHERE day >= #10/01/2008# AND day < #11/'1/2008# AND hotelID = 1

------------------

I get the error "Operation must be an updatable query" on the execution of this query.
Table has:

ID - autonumber
typeID - number
hotelID - number
day - Date/Time
bookingID - number
active - boolean

The db folder has write access, before anyone asks me.
0
Emanuele_Ciriachi
Asked:
Emanuele_Ciriachi
  • 3
  • 2
1 Solution
 
peter57rCommented:
If this is an exact copy of your code :
UPDATE tblRooms SET [Active] = false WHERE day >= #10/01/2008# AND day < #11/'1/2008# AND hotelID = 1
then
1) you have a spurious ' in the date value
2) day is a reserved word and should be enclosed in [ ] to indicate it is your field name.
0
 
Emanuele_CiriachiAuthor Commented:
Giving a try right now. Oh and the colon is just a typo, it is not present in the code.
0
 
Emanuele_CiriachiAuthor Commented:
no, doesn't work...

The database is remote, and I can read it using Select, no problem. Also, I left it without any sort of password protection. Does this rings a bell?
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
peter57rCommented:
Then it looks to me that the problem is not the query but is something to do with the connection.
When you say 'make it work online '
what exactly does that mean?  Are you on a LAN or trying to run across a WAN or what?
Can you change any other value in the database directly from your front end app?

0
 
Emanuele_CiriachiAuthor Commented:
I can run everything fine on my machine, but on the web server I can only run SELECT.

I am connected to Internet and have all sort of access to the we server. The DB folder has read/write permissions, of course.
0
 
CCongdonCommented:
OK, so the DB *folder* has read/write permissions, but what about the DB *file*? Is it set to inherit permissions from the folder? Is the folder set to propogate permissions to children? Does the file have an explicit deny on it? Is there a <dbname>.LDB file in the directory (a lock file)? Are you sure the correct user has the permissions?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now