micjohnson
Programmer
Hi there!
Here is my code.
<CFIF Departure IS "Y">
<CFSET Query_Name = "Student_Departure">
<CFELSE>
<CFSET Query_Name = "Student_Attendance">
</CFIF>
<CFOUTPUT>
<CFQUERY name="#Query_Name#" datasource="DSNname"
dbtype="ODBC">
SELECT *
FROM Tablename
WHERE School_Name='#School_Name#'
ORDER BY Last_Name, First_Name
</CFQUERY>
<CFIF ##Query_Name#.RecordCount# IS '0'>
<font color=blue><b>No Records found !/b></font>
<a href="Select_School.cfm?
Group=Staff&Departure=Y">Return Back</a>
<CFABORT>
</CFIF>
</CFOUTPUT>
otherwise continue
...
...
If Departure is "Y", the Query name should become "Student_Departure". It is OK and the query is working fine. But the problem is when i want to check the record count, it shows the error.
The error line is,
<CFIF ##Query_Name#.RecordCount# IS '0'>
I thing it may be a pound sign problem. But i can't rectify it. I need the help plse....
Thanx in Advance!!
micjohnson
Here is my code.
<CFIF Departure IS "Y">
<CFSET Query_Name = "Student_Departure">
<CFELSE>
<CFSET Query_Name = "Student_Attendance">
</CFIF>
<CFOUTPUT>
<CFQUERY name="#Query_Name#" datasource="DSNname"
dbtype="ODBC">
SELECT *
FROM Tablename
WHERE School_Name='#School_Name#'
ORDER BY Last_Name, First_Name
</CFQUERY>
<CFIF ##Query_Name#.RecordCount# IS '0'>
<font color=blue><b>No Records found !/b></font>
<a href="Select_School.cfm?
Group=Staff&Departure=Y">Return Back</a>
<CFABORT>
</CFIF>
</CFOUTPUT>
otherwise continue
...
...
If Departure is "Y", the Query name should become "Student_Departure". It is OK and the query is working fine. But the problem is when i want to check the record count, it shows the error.
The error line is,
<CFIF ##Query_Name#.RecordCount# IS '0'>
I thing it may be a pound sign problem. But i can't rectify it. I need the help plse....
Thanx in Advance!!
micjohnson