Skip to main content
Participant
November 4, 2007
Question

HELP! > Operation must use an updateable query.

  • November 4, 2007
  • 3 replies
  • 1806 views
Hi,

i dont know what is happening but i cant update or delete or insert records in my access database, this error appears:

Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]
Operation must use an updateable query.


i already talked to my web administrators and they said already give me all permissions, when i run locally that site on my local machine runs perfectly i can upload and insert all good, but one its in the server that bloody error appears,:

So Please!!, i need help on this one, i been trying to figuring what is wrong for days,, thank you..

check this link try to insert to see the problem

http://att.atentiusa.com/request/req.cfm



and this is my query i using on that page:

<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="#Request.DSN#">
INSERT INTO RequestSpots (SpotName, TypeID, "Description", DateRequest, AddressID)
VALUES (<cfif IsDefined("FORM.SpotName") AND #FORM.SpotName# NEQ "">

<cfqueryparam value="#FORM.SpotName#" cfsqltype="cf_sql_clob" maxlength="150">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.TypeID") AND #FORM.TypeID# NEQ "">
<cfqueryparam value="#FORM.TypeID#" cfsqltype="cf_sql_numeric">
<cfelse>
NULL
</cfif>
, <cfif IsDefined("FORM.Description") AND #FORM.Description# NEQ "">
<cfqueryparam value="#FORM.Description#" cfsqltype="cf_sql_clob" maxlength="1073741823">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.DateRequest") AND #FORM.DateRequest# NEQ "">
<cfqueryparam value="#FORM.DateRequest#" cfsqltype="cf_sql_timestamp">
<cfelse>
NULL
</cfif>
, <cfif IsDefined("FORM.AddressID") AND #FORM.AddressID# NEQ "">
<cfqueryparam value="#FORM.AddressID#" cfsqltype="cf_sql_numeric">
<cfelse>
NULL
</cfif>
)
</cfquery>
<cflocation url="/upload/upload.cfm">
</cfif>
<cfquery name="rsSpotTpe" datasource="#Request.DSN#">
SELECT TypeID, TypeName
FROM SpotTypes
</cfquery>
<cfquery name="rsAddresses" datasource="#Request.DSN#">
SELECT AddressID, Address
FROM Addresses
</cfquery>
<title>Atenti - Reel</title>
<cfinclude template="/includes/head.cfm">
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
.style3 {
color: #FF3300;
font-weight: bold;
}
-->
</style>
</head>
<body>
<cfinclude template="/includes/navigation.cfm">
<tr>
<td id="tdContent"><h1>Request New Spots</h1>
<p> </p>

<form method="post" enctype="multipart/form-data" name="form1" action="<cfoutput>#CurrentPage#</cfoutput>">



<table align="center">
<tr valign="baseline">
<td nowrap align="right">Spot Name:</td>
<td><input type="text" name="SpotName" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Screen Type:</td>
<td><select name="TypeID">
<cfoutput query="rsSpotTpe">
<option value="#rsSpotTpe.TypeID#">#rsSpotTpe.TypeName#</option>
</cfoutput>
</select>
</td>
<tr>
<tr valign="baseline">
<td nowrap align="right" valign="top">Description:</td>
<td><textarea name="Description" cols="50" rows="5"></textarea>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Date Request:</td>
<td><input type="text" name="DateRequest" value="<cfoutput>#LSDateFormat(Now())#</cfoutput>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td>
<td><select name="AddressID">
<cfoutput query="rsAddresses">
<option value="#rsAddresses.AddressID#">#rsAddresses.Address#</option>
</cfoutput>
</select>
</td>
<tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Save and Send"></td>

</tr>
</table>
<input type="hidden" name="MM_InsertRecord" value="form1">
</form>

<p> </p>
<p> </p>
<p> </p></td> <td id="tdSidebar"> </td>
</tr>
<cfinclude template="/includes/footer.cfm">
</body>
</html>
This topic has been closed for replies.

3 replies

November 5, 2007
Have you tried a JDBC connector instead of using ODBC?
Inspiring
November 5, 2007
First ensure you use the correct syntax

INSERT INTO RequestSpots (SpotName, TypeID, "Description", DateRequest, AddressID)

Should be

INSERT INTO RequestSpots (SpotName, TypeID, [Description], DateRequest, AddressID)

Second
What data type have you set the description and spotName field to be ? The code would indicate Memo (from memory just use varchar)

Third
Ensure that the columns can be set to NULL where you have this option.

Ken
Inspiring
November 5, 2007
Participating Frequently
November 5, 2007
Try this workaround:
http://support.microsoft.com/kb/830977

Thanks