Link to home
Start Free TrialLog in
Avatar of jag5311
jag5311

asked on

Getting a TOO FEW PARAMETERS problem with Coldfusion MX and Access 2002

Here is some of the error code

Error Executing Database Query.
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.

The Error Occurred in C:\CFusionMX\wwwroot\gamecube\article_edit.cfm: line 14

12 : postedemail='#TRIM(FORM.postedemail)#'
13 : WHERE articleID=<cfqueryparam value="#FORM.articleID#" cfsqltype="cf_sql_integer">
14 : </CFQUERY>

SQL UPDATE articles SET gamedID=1, typeID=5, articletitle='New Metroid Preview', articletext='Whoa, new one baby', articledescription='New one', articledate=5/5/93, postedby='New one', postedemail='New one' WHERE articleID= (param 1)


Now, I have a page that is used for inserting/updating depending on the variables being passed.

Well, it has no problem inserting information into a database, but I am receiving the above error when updating and I can't figure it out for the life of me.

Here is the code that seems to be in the problem.

<cfset EditMode=IsDefined("FORM.articleID")>
<cfif EditMode>
<CFQUERY datasource="#dsn#">
UPDATE articles
SET gamedID=#FORM.gameID#,
typeID=#FORM.articletypes#,
articletitle='#TRIM(FORM.articletitle)#',
articletext='#TRIM(FORM.articletext)#',
articledescription='#TRIM(FORM.articledescription)#',
articledate=#FORM.articledate#,
postedby='#TRIM(FORM.postedby)#',
postedemail='#TRIM(FORM.postedemail)#'
WHERE articleID=<cfqueryparam value="#FORM.articleID#" cfsqltype="cf_sql_integer">
</CFQUERY>

Well, as you can see, it appears I am using only 1 parameter, articleID=#FORM.articleID#, but I can't figure out why its giving me an error.

ANy help
Thanks
Bryan
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jag5311
jag5311

ASKER

Thanks, I just posted it.

Anyway to close this one?
Avatar of jag5311

ASKER

oh well, gave you the points