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\gamec ube\articl e_edit.cfm : line 14
12 : postedemail='#TRIM(FORM.po stedemail) #'
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.a rticleID") >
<cfif EditMode>
<CFQUERY datasource="#dsn#">
UPDATE articles
SET gamedID=#FORM.gameID#,
typeID=#FORM.articletypes# ,
articletitle='#TRIM(FORM.a rticletitl e)#',
articletext='#TRIM(FORM.ar ticletext) #',
articledescription='#TRIM( FORM.artic ledescript ion)#',
articledate=#FORM.articled ate#,
postedby='#TRIM(FORM.poste dby)#',
postedemail='#TRIM(FORM.po stedemail) #'
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
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\gamec
12 : postedemail='#TRIM(FORM.po
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.a
<cfif EditMode>
<CFQUERY datasource="#dsn#">
UPDATE articles
SET gamedID=#FORM.gameID#,
typeID=#FORM.articletypes#
articletitle='#TRIM(FORM.a
articletext='#TRIM(FORM.ar
articledescription='#TRIM(
articledate=#FORM.articled
postedby='#TRIM(FORM.poste
postedemail='#TRIM(FORM.po
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#
ANy help
Thanks
Bryan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh well, gave you the points
ASKER
Anyway to close this one?