Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Just to keep you in the loop - it was a permissions problem on the mdb file. Sorted now phew
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
No probs - got the message