59 views No reply.:(
I need some help ..
<cfqueryparam> is normally used when you want to sanitize user input (URL or Form scope data etc) that is passed to a database query. In this case the string "IN STOCK" is hard-coded, so why not just use:
SELECT * FROM SHOP_FINDINGS
WHERE ROWNUM<=20 AND OPER_NAME = 'IN STOCK'
Does that SELECT statement work? Also, try specifying the column names in the SELECT, rather than using the * wildcard. The parentheses are not needed in your statement either I don't think. This error normally occurs when you specify a missing column name or wildcard, or if a bracket/comma is missing or doesn't match etc. Re-check the query and write a test template to just issue one query to test it perhaps.
FOr an example, I made the value as "In Stock" but actually it was the user input.
selecting the columns dint work:(
Yes I m using the test template only; i have made the function and query separately and trying it but still in vain.
Can you please post your code in its entirety? Please also try using "cf_sql_char" as the sql type and give that a shot. Also, try omitting the cfsqltype and see what error, if any, that gives.