troubleshooting Question

CF -Incorrect syntax near '@P1'.

Avatar of JohnMac328
JohnMac328Flag for United States of America asked on
Microsoft SQL ServerColdFusion Language
9 Comments1 Solution3609 ViewsLast Modified:
I am using a form with a insert query - I did a form dump and all the values are correct - for some reason I keep getting the Incorrect syntax near '@P1'.  which does not google many answers.

Thanks

SQLServer JDBC Driver][SQLServer]Incorrect syntax near '@P1'.  
 
The error occurred in C:\inetpub\wwwroot\maxibillion_CF\Buy_Prize.cfm: line 53
 
51 :         <cfqueryparam value="#form.gift_present15#" cfsqltype="cf_sql_varchar"> ,
52 :         <cfqueryparam value="#form.value15#" cfsqltype="cf_sql_integer"> ,
53 :         <cfqueryparam value="#form.gift_presentcolor#" cfsqltype="cf_sql_varchar">
54 :     )
55 :     </cfquery>


<cfif structKeyExists(FORM, "submitButton15")>
 <cfquery name="entershirts" datasource="IntranetDB_Coldfusion">
 INSERT INTO prize_records (purchaser, award_desc, award_cost, award_color)
 (
        <cfqueryparam value="#form.employeeID#"  cfsqltype="cf_sql_integer"> ,
        <cfqueryparam value="#form.gift_present15#" cfsqltype="cf_sql_varchar"> ,
        <cfqueryparam value="#form.value15#" cfsqltype="cf_sql_integer"> ,
        <cfqueryparam value="#form.gift_presentcolor#" cfsqltype="cf_sql_varchar">
    )
    </cfquery>
    </cfif>
ASKER CERTIFIED SOLUTION
gdemaria

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros