I can never seem to write a componenct without some sort of error in the SQL or in the structure. Here is my list of things to check if I can not find the error.
- In the bind statement make sure parameters are separated by commas and the statement is well formed. bind=”cfc:myCFC.method({var1@change},{var2})”
- Make sure you have the correct number of cfArguments on the cfc for the number of parameter values passed AND that the arguments are listed in the same order as passed from the bind statement.
- Make sure your values passed are not null or invalid types.
- Check your SQL statement, look for missing commas, mispellings, missing quotes, and general bad syntax. Double check group by and having statements.
- Database Errors – make sure you have appropriate permissions for the table from the SQL server.
- Database Errors – Make sure the DB is available and that the CF user/password is valid.
- If using multiple datasources, make sure your reference to the SQL Table is the correct datasource.
Please feel free to add any others you may encounter in the comments for this thread.