Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFTRY, CFCATCH Problem!!!

Status
Not open for further replies.

micjohnson

Programmer
Nov 9, 2000
86
US
Hi there!

When i am using CFTRY, CFCATCH, i am getting this error.

Error:

Just in time compilation error

An extraneous end tag </CFCATCH> has been encountered at document position (120:3) to (120:12). End tags cannot be present in CFML templates without a matching start tag.


My code is:

<CFTRY>

<CFQUERY NAME=&quot;DailyAttendance&quot; DATASOURCE=&quot;DC_Schools&quot;>
INSERT INTO dbo.Daily_Rec (<CFIF Group IS NOT &quot;Staff&quot;>Time_in_first_half<CFELSE>Time_in_first_half, Hours </CFIF>, Spec_code, Time_Out_First_half, Time_out_second_half, Time_in_second_half, String_Date)
VALUES ('#AttendanceArray[2][outercounter]#', <CFIF Group IS &quot;Staff&quot;>'12:00 AM', </CFIF>'#AttendanceArray[1][outercounter]#', '#Time_out#', '#Time_out_2nd#', '#Time_in_2nd#', '#String_Date#')
</CFQUERY>
<CFCATCH TYPE=&quot;Database&quot;>

<CFOUPUT> Error #CFCATCH.SQLSTATE#</CFOUTPUT>

</CFCATCH>
</CFTRY>

Help me plse.

mic
 
Hey Mic,

The only error I see is a mis-spelled <cfoutput> tag.

In the line &quot;<CFOUPUT> Error #CFCATCH.SQLSTATE#</CFOUTPUT>&quot;, your <cfoutput> tag is spelled CFOUPUT instead of CFOUTPUT. Other than that, your <cftry>/<cfcatch> syntax is fine.

Hope this helps,
GJ
 
Hi GunJack!

Thanx for your solution. Its working now. The problem was mis-spelled of <cfoutput> and nesting <cfoutput> with another <cfoutput>. So i remove the nested one. Now working fine.

Thanx
micjohnson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top