Skip to main content
October 15, 2009
Question

Newbie question about update queries

  • October 15, 2009
  • 2 replies
  • 1456 views

I know this is really a trivial problem, but I'm a complete beginner and my hosting service won't help

Here is the code for a CFM type web page that I created:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>


<body>

<p>Now try to add a record!</p>

<!-- First we select all data from the table -->


<cfquery name="AddUser" datasource="CFTest">

   INSERT INTO Users (Firstname, Lastname,Age)

   VALUES ('Marie', 'Ricot',65)

</cfquery>


</body>

</html>

When I submit this, I get this error (can't attach image-too slow loading)

"Error occurred while processing this request

Error executing database query

{MacromediaSequelink JDBC driverODBCSocketMicrosoftODBCMicrosoftAccessDriver] Operation must use an updateable query

In other words, there is something wrong with the insert although what I do not know

any help very much appreciated

Paul

This topic has been closed for replies.

2 replies

October 15, 2009

Hi,

I changed the table name from "Users" to "testpeople" but still the same problem. Why is it

telling me that the query must be updateable?

ilssac
Inspiring
October 15, 2009

Database design and|or permissions?

Are any of those fields not allowed to be updated by the database.

Any security on the database preventing the user defined in the CF DSN setting to not update the table.

That would be pretty unusaly with a simple Access database, but it is possible.

October 15, 2009

Ah! Someone with some Nous! thanks - yes it is permissions. I am trying

to fix this with my web hoster but their instructions are hopeless

They keep telling me to change permissions of "IWAM_Plesk" user for subdirectories

- what does that mean.

Thanks for any enlightenment

Inspiring
October 15, 2009

Your syntax is fine.  The most likely cause of your problem is that "users" is a reserved word in access.  Try changing the name of your table.

October 15, 2009

Just to keep you in the loop - it was a permissions problem on the mdb file. Sorted now phew