Hi All,
It is probably a very dummy question, but I just started Cold Fusion, anyways, so how come this:
<cfset strQuery = "SELECT * FROM members WHERE FIRST_NAME LIKE 'Smith%' AND LICENSE_STATUS IS NOT NULL ORDER BY SORT_FIELD">
<CFQUERY NAME="SearchList" DATASOURCE="iMIS_Members">
#strQuery#
</CFQUERY>
does not work, but this does:
<CFQUERY NAME="SearchList" DATASOURCE="iMIS_Members">
SELECT * FROM members WHERE FIRST_NAME LIKE 'Smith%' AND LICENSE_STATUS IS NOT NULL ORDER BY SORT_FIELD
</CFQUERY>
The first one gives me an ODBC error, however it looks identical to me to the other.
Any ideas?
It is probably a very dummy question, but I just started Cold Fusion, anyways, so how come this:
<cfset strQuery = "SELECT * FROM members WHERE FIRST_NAME LIKE 'Smith%' AND LICENSE_STATUS IS NOT NULL ORDER BY SORT_FIELD">
<CFQUERY NAME="SearchList" DATASOURCE="iMIS_Members">
#strQuery#
</CFQUERY>
does not work, but this does:
<CFQUERY NAME="SearchList" DATASOURCE="iMIS_Members">
SELECT * FROM members WHERE FIRST_NAME LIKE 'Smith%' AND LICENSE_STATUS IS NOT NULL ORDER BY SORT_FIELD
</CFQUERY>
The first one gives me an ODBC error, however it looks identical to me to the other.
Any ideas?