Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Newbie question about update queries

Guest
Oct 15, 2009 Oct 15, 2009

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

TOPICS
Database access
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 15, 2009 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 15, 2009 Oct 15, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 15, 2009 Oct 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 15, 2009 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 15, 2009 Oct 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 15, 2009 Oct 15, 2009

Well I can only presume that "IWAM_Plesk" is a user on the computer system that has something to do with this database.

Changing permissions on the subdirectories would probably be file system permissions done in the operating system.

But if you are working with a web hosting service, these tasks normally fall within the duties done by hosting services on their systems.

What type of hosting service are you utilizing?  What type of support agreements do you have with them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 15, 2009 Oct 15, 2009

Hi Ian,

Thanks very much for your time. I have fixed it now. In the "PLESK" control

panel (used by this Hoster) you have to change the permissions of the mdb

file but only for a user listed in the maintenance screen called "IWAM_PLESK user (default)"

By giving this user full rights, I can now modify the database.

Phew, why is life so complicated?

Have a good day anyway

PS: Are you a CF expert, I mean, if I get into trouble may I email you for

solutions as long as I don't bother you too much?

I would understand if you wish to decline the request!!

cheers

Paul

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 15, 2009 Oct 15, 2009

I like to think I'm fairly knowledgable but I'm nowhere near a Ben Forta or Hal Helms level.

These forums, or others like it, are the best place to get community help.  There is always somebody watching here, where as I am likely to take vacations and other days off.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 16, 2009 Oct 16, 2009
LATEST

No probs - got the message

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources