| Author |
Message |
|
|
Does anyone have cfloop working?
if so, could you let me know what your configuration is...
Thanks for any help.
John H
|
 |
|
|
Still getting an error doing cfloop after upgrading to new version 2.5.3 for windows.
At first it wouldn't even do cfquery for an access database until I copied the Lib folder from the old version WEB-INF to the new version.
Error message: Compile of file "C:\smithnew\wwwroot\s7_ver4_work\attributes.cfm" failed with status 1:
C:\smithnew\wwwroot\WEB-INF/_smithwork/_out//__smithdynamic/_C/_smithnew/_wwwroot/_s7_ver4_work/_attributes.java:448: valueOf(java.lang.String) in java.lang.Double cannot be applied to (double)
Double __lower_value_154 = Double.valueOf(SmCast._doubleValue("1"));
If I just leave out the CFLOOP section, there is no error.
I have shortened the code for this exampe. The shortened code does the same.
Thanks for your help,
Here is the Code:
<cfsetting enablecfoutputonly="No">
<cflock scope="APPLICATION" type="READONLY" timeout="10">
<cfset a.root = #application.root#>
</cflock>
<cfinclude template="cookiesec.cfm">
<cflock scope="SESSION" type="READONLY" timeout="30">
<CFIF NOT IsDefined("session.loginid")>
<CFLOCATION url="#a.root#index.cfm?s7apperr=1">
</cfif>
</cflock>
<cfinclude template="#a.root#_varlock.cfm">
<cfinclude template="#a.root#_uvarlock.cfm">
<CFSET p_var=8>
<HTML>
<cfset chkstuid=#url.studentid#>
<cfinclude template="tchsecurit.cfm">
<cfif s.logging eq 1>
<cf_wvlog TEXT="#s.loginid#, #url.studentid#, Profile Attributes, #s.level#">
</cfif>
<cfset ofile = "PSTU301">
<cfinclude template="#a.root#ovrfile.cfm">
<cfset ofile = "PSTU320">
<cfinclude template="#a.root#ovrfile.cfm">
<cfset ofile = "PSTU107">
<cfinclude template="#a.root#ovrfile.cfm">
<cfset ofile = "PSTU108">
<cfinclude template="#a.root#ovrfile.cfm">
<cfquery name="getatr" datasource="#s.datasrc#" dbtype="ODBC" username="#a.s7DSN_user#" password="#a.s7DSN_Password#">
SELECT *
FROM PSTU301, PSTU320
WHERE stucdn='#URL.district#' and stucsn='#URL.school#' and
stuid=#url.studentid# AND STUCDN = SCHDIS AND STUCSN = SCHID
ORDER BY STUCSN, STUSNM, STUFNM
</cfquery>
<cfquery name="gettbl" datasource="#s.datasrc#" dbtype="ODBC" username="#a.s7DSN_user#" password="#a.s7DSN_Password#">
SELECT *
FROM PSTU107
</cfquery>
<CFSET atrd = arraynew(1)>
<CFSET atrv = arraynew(1)>
<CFSET astu = arraynew(1)>
<cfoutput query="gettbl">
<cfset arrayappend(atrd, gend01)>
<cfset arrayappend(atrd, gend02)>
<cfset arrayappend(atrv, genv01)>
<cfset arrayappend(atrv, genv02)>
</cfoutput>
<cfoutput query="getatr">
<cfset arrayappend(astu, stu01)>
<cfset arrayappend(astu, stu02)>
<TITLE>Scepter7 - Student Attributes</title>
<BODY bgcolor="F7EFC6">
<table width="600" border="0" align="left">
<tr>
<td>
<font class="proheader"> <b>ATTRIBUTES</b></font>
</td>
</tr>
</table>
<br clear="all">
<table width="600" border="1">
<tr>
<td>
<cfinclude template="stuhdr.cfm">
</td></tr></table>
</cfoutput><cfabort>
<table width="590" border="1">
<tr>
<td>
<table width="590" border="1">
<tr>
<TD width="35%" bgcolor="efc6ed"><font class="prolabel"><b>Attribute</b></font></td>
<TD width="12%" bgcolor="efc6ed"><font class="prolabel"><b>Value</b></font></td>
<TD align="left" width="53%" bgcolor="#efc6ed"><font class="prolabel"><b>Description</b></font></td>
</tr>
<cfset loopstart = 1>
<cfset loopend = 2>
<CFloop INDEX="LC" FROM="#loopstart#" TO="#loopend#">
#atrd[LC]#
</CFLOOP>
</table>
</td></tr></table>
<cfoutput>
<cfset ofile = "PSTU301">
<cfinclude template="#a.root#ovrfile_undo.cfm">
<cfset ofile = "PSTU320">
<cfinclude template="#a.root#ovrfile_undo.cfm">
<cfset ofile = "PSTU107">
<cfinclude template="#a.root#ovrfile_undo.cfm">
<cfset ofile = "PSTU108">
<cfinclude template="#a.root#ovrfile_undo.cfm">
<!--- <CFINCLUDE template="pfooter.cfm">
--->
</cfoutput> --->
</BODY>
</HTML>
^
C:\smithnew\wwwroot\WEB-INF/_smithwork/_out//__smithdynamic/_C/_smithnew/_wwwroot/_s7_ver4_work/_attributes.java:454: valueOf(java.lang.String) in java.lang.Double cannot be applied to (double)
__ctx.setVar(__index_154, Double.valueOf(__i_154))
^
2 errors
Error type: compiler
File: C:\smithnew\wwwroot\s7_ver4_work\index.cfm
Row: 25
Column: 4
|
 |
|
|
This is very cool!
Can't wait till the next release as all I am stuck on is the CFLOOP function.
Keep up the good work!
John Halonen
|
 |
|
|
|
|