column not allowed, ajax submit
What I have is a form for managing who gets notifications concerning another web app. It is very simple: add and delete who gets the notifications. On the delete field I have a jQuery autocomplete function, and on select it asks the user to confirm the deletion. If yes, it does a jQuery .ajax() call to my coldfusion file that deletes the user from the Oracle database. This function works as it should. On the add field, I have a jQuery .change() event that confirms the add. If yes, it should add the user email and an auto-incremented ID. This is where my problem is. I am getting a database error from the server and I don't know why. The syntax looks correct to me. I have used this syntax in other places in my app and it worked. Does anyone see my problem?
<cftry> <cfif IsDefined('URL.theAction') && URL.theAction eq 'delete'> <cfquery name="qDeleteUser" datasource="#thedb#"> DELETE FROM notify WHERE user_id = <cfqueryparam value="#URL.theID#" cfsqltype="CF_SQL_NUMERIC"> </cfquery> <cfelse> <cfquery name="qAddUser" datasource="#thedb#"> INSERT INTO notify (user_id, name) VALUES (seq_notifyid, <cfqueryparam value="#URL.theName#" cfsqltype="CF_SQL_VARCHAR">) </cfquery> </cfif>
The catch produces this:
error code: 984
message: [Macromedia][Oracle JDBC Driver][Oracle]ORA-00984: column not allowed here
I knew this would be something stupid. It would help if I actually auto-incremented the auto-increment field. (.nextVal )