[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Attribute validation error. A duplicate attribute TYPE has been encountered. Attributes with the same name cannot be provided more than once.

Posted on 2011-10-19
12
Medium Priority
?
1,033 Views
Last Modified: 2012-05-12
I am getting the following error. Any ideas?

Attribute validation error. A duplicate attribute TYPE has been encountered. Attributes with the same name cannot be provided more than once.
<cfparam name="edt" default="n">
<cfparam name="gid" default="0">
<cfparam name="tid" default="0">
<cfparam name="sid" default="0">
<cfparam name="initialEng" default="0">
<cfparam name="stamina" default="0">
<cfparam name="revision" default="0">
<cfparam name="editing" default="0">
<cfparam name="processTot" default="0">
<cfparam name="genre1" default="0">
<cfparam name="genre2" default="0">
<cfparam name="genre3" default="0">
<cfparam name="genreTot" default="0">
<cfparam name="vocabulary" default="0">
<cfparam name="clearFocus" default="0">
<cfparam name="elaborates" default="0">
<cfparam name="elaboratesex" default="0">
<cfparam name="strategyTot" default="0">
<cfparam name="legibility" default="0">
<cfparam name="directionality" default="0">
<cfparam name="spacing" default="0">
<cfparam name="letterform" default="0">
<cfparam name="capitalization" default="0">
<cfparam name="sentenceStruct" default="0">
<cfparam name="sentenceVar" default="0">
<cfparam name="puncuation" default="0">
<cfparam name="spellingDev" default="0">
<cfparam name="conventionTot" default="0">
<cfparam name="c4total" default="0">

<cfif sid eq 0>
<script language="JavaScript">
		alert('Please specify a Student');
		javascript:history.back();
	</script>
</cfif>

<cfif len(sid) gt 0 and new neq "y">
	<cfquery name="edit" datasource="#datasource#">
    	update classProfile 
        	set tid = #session.tid#, 
            sid = #sid#, 
            grade = 'K', 
            initialEng = #initialEngTot#, 
            stamina = #staminaTot#, 
            revision = #revisionTot#, 
            editing = #editingTot#, 
            processTot = #total#, 
            genre1 = #genre1Tot#, 
            genre2 = #genre2Tot#, 
            genre3 = #genre3Tot#, 
            genreTot = #total2#,             
            vocabulary = #powerfulVocab#,  
            clearFocus = #clearFocusTot#, 
            elaborates = #elaboratesTot#,
            elaboratesex = #elaboratesexTot#,
            strategyTot = #total3#,  
            legibility = #legibilityTot#, 
            directionality = #directionalityTot#, 
            spacing = #spacingTot#, 
            letterForm = #letterFormTot#, 
            capitalization = #capitalizationTot#, 
            sentenceStruct = #sentenceStructTot#, 
            sentenceVar = #sentenceVarTot#, 
            puncuation = #puncuationTot#, 
            spellingDev = #spellingDevTot#, 
            conventionTot = #total4#, 
            c4total = #grandtotal#
            updated = #CreateODBCDate(today)#
         where gid = #gid#
	</cfquery>
<cfelse>
    <cfquery name="insert" datasource="#datasource#">
        insert into classProfile (tid, sid, grade, initialEng, stamina, revision, editing, processTot, genre1, genre2, genre3, genreTot, vocabulary, clearFocus, elaborates, elaboratesex, strategyTot, legibility, directionality, spacing, letterForm, capitalization, sentenceStruct, sentenceVar, puncuation, spellingDev, conventionTot, c4total, updated)
        values (#session.tid#, #sid#, 'K', #initialEngTot#, #staminaTot#, #revisionTot#, #editingTot#, #total#, #genre1Tot#, #genre2Tot#, #genre3Tot#, #total2#, #vocabulary#, #clearFocusTot#, #elaboratesTot#, #elaboratesexTot#, #total3#, #legibilityTot#, #directionalityTot#, #spacingTot#, #letterFormTot#, #capitalizationTot#, #sentenceStructTot#, #sentenceVarTot#, #puncuationTot#, #spellingDevTot#, #total4#, #grandtotal#, #CreateODBCDate(today)#)
    </cfquery>
</cfif>

<cflocation url="index.cfm?status=SUCCESS">

Open in new window

0
Comment
Question by:kallestie
  • 7
  • 4
12 Comments
 
LVL 52

Expert Comment

by:_agx_
ID: 36995581
I don't think the error's coming from that code ( because I don't even see the word "type" ).  

Usually that type of error occurs when calling a custom/CF tag, like this.  The code below would cause an error because it accidentally supplies the "type" value twice

         <cf_myCustomTag  type="a" type="a">

... instead of only once

         <cf_myCustomTag  type="a">

0
 
LVL 39

Accepted Solution

by:
gdemaria earned 1000 total points
ID: 36995617
But also note...

You don't have any quotes or checks for empty values in your update statement.  

If any of the variables are either empty or a non-integer, it will give an error..

For example, if this variable "initialEngTot" were empy, the statement would error.

  initialEng = #initialEngTot#,

You should use cfqueryparam or at least val(initialEngTot) to prevent sql injection and errors
0
 
LVL 2

Author Comment

by:kallestie
ID: 36995645
This is the form code. Could it be there?
<cfparam name="gid" default="0">
<cfparam name="tid" default="0">
<cfparam name="sid" default="0">
<cfparam name="initialEng" default="0">
<cfparam name="stamina" default="0">
<cfparam name="revision" default="0">
<cfparam name="editing" default="0">
<cfparam name="genre1" default="0">
<cfparam name="genre2" default="0">
<cfparam name="genre3" default="0">
<cfparam name="vocabulary" default="0">
<cfparam name="clearFocus" default="0">
<cfparam name="elaborates" default="0">
<cfparam name="elaboratesex" default="0">
<cfparam name="legibility" default="0">
<cfparam name="directionality" default="0">
<cfparam name="capitalization" default="0">
<cfparam name="sentenceStruct" default="0">
<cfparam name="sentenceVar" default="0">
<cfparam name="puncuation" default="0">
<cfparam name="spellingDev" default="0">
<cfparam name="c4total" default="0">

<cfquery name="getTeachers" datasource="#datasource#">
	select * from teachers order by lastname
</cfquery>

<cfquery name="getStudents" datasource="#datasource#">
	select * from students order by lastname
</cfquery>

<cfquery name="get" datasource="#datasource#">
	select * from grid where grade = 'K'
	<cfif len(sid) gt 0> and sid = #sid#
		<cfelseif len(tid) gt 0> and tid = #tid#
		<cfelseif len(tid) gt 0 and  len(sid) gt 0> and tid = #tid# and sid = #sid#
	</cfif>
</cfquery>

<cfinclude template="../header.cfm">
<script language="javascript">

function gint(p) {
	var p1 = parseInt(p); 
	if (isNaN(p1))
		return 0;
	else
		return p1;
}

function dograndtotal() {
	ProcessTotal    = gint(document.getElementById("total").value);
	GenreTotal 	= gint(document.getElementById("total2").value);
	StrategyTotal 	= gint(document.getElementById("total3").value);
	ConventionTotal = gint(document.getElementById("total4").value);

	document.getElementById("t_total").value  = document.getElementById("total").value;
	document.getElementById("t_total2").value = document.getElementById("total2").value;
	document.getElementById("t_total3").value = document.getElementById("total3").value;
	document.getElementById("t_total4").value = document.getElementById("total4").value;

	total = ProcessTotal + GenreTotal + StrategyTotal + ConventionTotal;
	document.getElementById("grandtotal").value = total;
}

</script>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
</td></tr>
</table>
<h1 align="center">Assessment Grid Grade K - Fall/Winter Administration</h1>
<form name="grid" method="post" action="grid_process.cfm<cfif get.recordcount gt 0>?edt=y</cfif>">
<table border="0" cellspacing="0" cellpadding="4" width="85%" align="center" style="border-bottom: solid #333333;">
  <tr>
    <td width="6%">Name: </td>
    <td width="49%"><select name="sid">
    	<option value="">--select student--</option>
        <cfoutput query="getStudents">
        <option value="#sid#"<cfif get.sid eq "#sid#"> selected</cfif>>#lastname#, #firstname#</option>
        </cfoutput>
    </select></td>
    <td width="45%" colspan="2"><p>&nbsp;</p></td>
  </tr>
  </table>
<table border="0" cellspacing="2" cellpadding="2" width="85%" align="center" style="border: solid; border-width: thin;">
  <tr>
    <td><span class="style2">Evidence of Success</span></td>
    <td width="7%" align="center"><strong>None<br />1</strong></td>
    <td width="7%" align="center"><strong>Some<br />2</strong></td>
    <td width="7%" align="center"><strong>Solid<br />3</strong></td>
    <td width="7%" align="center"><strong>Outstanding<br />4</strong></td>
    <td width="7%" align="center" valign="top"><strong>Weight*</strong></td>
    <td width="7%" align="center"><strong>Total Score</strong></td>
  </tr>
  <tr>
    <td colspan="7" bgcolor="#000000"><span class="style1">Process</span></td>
  </tr>
  <tr>
    <td colspan="7">Success with various aspects of the Writing Process.</td>
  </tr>
  <tr>
    <td>Initial Engagement</td>
    <td align="center"><input name="initialEng" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="initialEng" type="radio" value="2" /></td>
    <td align="center"><input name="initialEng" type="radio" value="3" /></td>
    <td bgcolor="#999999">&nbsp;</td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="initialEngTot"<cfif get.recordcount gt 0 and get.initialEng gt 0> value="<cfoutput>#get.initialEng#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Stamina</td>
    <td align="center"><input name="stamina" type="radio" value="1" checked="CHECKED" /></td>
    <td align="center"><input name="stamina" type="radio" value="2" /></td>
    <td align="center"><input name="stamina" type="radio" value="3" /></td>
    <td align="center"><input name="stamina" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="staminaTot"<cfif get.recordcount gt 0 and get.stamina gt 0> value="<cfoutput>#get.stamina#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Revision</td>
    <td align="center"><input name="revision" type="radio" value="1" checked="CHECKED" /></td>
    <td align="center"><input name="revision" type="radio" value="2" /></td>
    <td align="center"><input name="revision" type="radio" value="3" /></td>
    <td align="center"><input name="revision" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="revisionTot"<cfif get.recordcount gt 0 and get.revision gt 0> value="<cfoutput>#get.revision#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td bgcolor="#999999">Editing (applies to Spring administration only)</td>
    <td align="center" bgcolor="#999999"><input name="editing" type="radio" value="1" checked="CHECKED" disabled="disabled" /></td>
    <td align="center" bgcolor="#999999"><input name="editing" type="radio" value="2" disabled="disabled" /></td>
    <td align="center" bgcolor="#999999"><input name="editing" type="radio" value="3" disabled="disabled" /></td>
    <td align="center" bgcolor="#999999"><input name="editing" type="radio" value="4" disabled="disabled" /></td>
    <td align="center" bgcolor="#999999">X1</td>
    <td align="center" bgcolor="#999999"><input type="text" name="editingTot" value="0" disabled="disabled" /></td>
  </tr>
  <tr>
    <td colspan="6" align="right"><strong>Process Total</strong></td>
    <td align="center"><input type="text" name="total" id="total"<cfif get.recordcount gt 0 and get.processTot gt 0> value="<cfoutput>#get.processTot#</cfoutput>"<cfelse> value="3"</cfif> /></td>
  </tr>
</table>
<br />
<table border="0" cellspacing="2" cellpadding="2" width="85%" align="center" style="border: solid; border-width: thin;">
  <tr>
    <td colspan="7" bgcolor="#000000"><span class="style1">Genre</span></td>
  </tr>
  <tr>
    <td colspan="7">Success with characteristics of the "I Remember" genre of personal narrative/recollection.</td>
  </tr>
  <tr>
    <td>Topic is a memory and/or story from own life</td>
    <td width="7%" align="center"><input name="genre1" type="radio" value="1" checked="checked" /></td>
    <td width="7%" align="center"><input name="genre1" type="radio" value="2" /></td>
    <td width="7%" align="center"><input name="genre1" type="radio" value="3" /></td>
    <td width="7%" align="center" bgcolor="#999999">&nbsp;</td>
    <td width="7%" align="center">X1</td>
    <td width="7%" align="center"><input type="text" name="genre1Tot"<cfif get.recordcount gt 0 and get.genre1 gt 0> value="<cfoutput>#get.genre1#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Logically sequenced details (usually chronological)</td>
    <td align="center"><input name="genre2" type="radio" value="1" checked="CHECKED" /></td>
    <td align="center"><input name="genre2" type="radio" value="2" /></td>
    <td align="center"><input name="genre2" type="radio" value="3" /></td>
    <td align="center"><input name="genre2" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td><input type="text" name="genre2Tot"<cfif get.recordcount gt 0 and get.genre2 gt 0> value="<cfoutput>#get.genre2#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Conveys why topic is important to self and/or feelings about topic</td>
    <td align="center"><input name="genre3" type="radio" value="1" checked="CHECKED" /></td>
    <td align="center"><input name="genre3" type="radio" value="2" /></td>
    <td align="center"><input name="genre3" type="radio" value="3" /></td>
    <td align="center"><input name="genre3" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td><input type="text" name="genre3Tot"<cfif get.recordcount gt 0 and get.genre3 gt 0> value="<cfoutput>#get.genre3#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td colspan="6" align="right"><strong>Genre Total</strong></td>
    <td><input type="text" name="total2" id="total2"<cfif get.recordcount gt 0 and get.genreTot gt 0> value="<cfoutput>#get.genreTot#</cfoutput>"<cfelse> value="3"</cfif> /></td>
  </tr>
</table>
<br />
<table border="0" cellspacing="2" cellpadding="2" width="85%" align="center" style="border: solid; border-width: thin;">
  <tr>
    <td colspan="7" bgcolor="#000000"><span class="style1">Strategy</span></td>
  </tr>
  <tr>
    <td colspan="7">Success using a variety of the strategies of accomplished authors.</td>
  </tr>
  <tr>
    <td>Powerful Vocabulary</td>
    <td width="7%" align="center"><input name="powerfulVocab" type="radio" value="1" checked="checked" /></td>
    <td width="7%" align="center"><input name="powerfulVocab" type="radio" value="2" /></td>
    <td width="7%" align="center"><input name="powerfulVocab" type="radio" value="3" /></td>
    <td width="7%" align="center"><input name="powerfulVocab" type="radio" value="4" /></td>
    <td width="7%" align="center">X1</td>
    <td width="7%" align="center"><input type="text" name="powerfulVocabTot"<cfif get.recordcount gt 0 and get.vocabulary gt 0> value="<cfoutput>#get.vocabulary#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Clear Focus</td>
    <td align="center"><input name="clearFocus" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="clearFocus" type="radio" value="2" /></td>
    <td align="center"><input name="clearFocus" type="radio" value="3" /></td>
    <td align="center"><input name="clearFocus" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="clearFocusTot"<cfif get.recordcount gt 0 and get.clearFocus gt 0> value="<cfoutput>#get.clearFocus#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Elaborates with details in the drawing</td>
    <td align="center"><input name="elaborates" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="elaborates" type="radio" value="2" /></td>
    <td align="center"><input name="elaborates" type="radio" value="3" /></td>
    <td align="center"><input name="elaborates" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="elaboratesTot"<cfif get.recordcount gt 0 and get.elaborates gt 0> value="<cfoutput>#get.elaborates#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Elaborates with details and examples in the drawing</td>
    <td align="center"><input name="elaboratesex" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="elaboratesex" type="radio" value="2" /></td>
    <td align="center"><input name="elaboratesex" type="radio" value="3" /></td>
    <td align="center"><input name="elaboratesex" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="elaboratesexTot"<cfif get.recordcount gt 0 and get.elaboratesex gt 0> value="<cfoutput>#get.elaboratesex#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td colspan="6" align="right"><strong>Strategy Total</strong></td>
    <td align="center"><input type="text" name="total3" id="total3"<cfif get.recordcount gt 0 and get.strategyTot gt 0> value="<cfoutput>#get.strategyTot#</cfoutput>"<cfelse> value="4"</cfif> /></td>
  </tr>
</table>
<br />
<table border="0" cellspacing="2" cellpadding="2" width="85%" align="center" style="border: solid; border-width: thin;">
  <tr>
    <td colspan="7" bgcolor="#000000"><span class="style1">Conventions</span></td>
  </tr>
  <tr>
    <td colspan="7">Success applying the rules and patterns of the English language.</td>
  </tr>
  <tr>
    <td>Directionality</td>
    <td width="7%" align="center"><input name="directionality" type="radio" value="1" checked="checked" /></td>
    <td width="7%" align="center"><input name="directionality" type="radio" value="2" /></td>
    <td width="7%" align="center"><input name="directionality" type="radio" value="3" /></td>
    <td width="7%" align="center" bgcolor="#999999">&nbsp;</td>
    <td width="7%" align="center">X1</td>
    <td width="7%" align="center"><input type="text" name="directionalityTot"<cfif get.recordcount gt 0 and get.directionality gt 0> value="<cfoutput>#get.directionality#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Letter Formation</td>
    <td align="center"><input name="letterForm" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="letterForm" type="radio" value="2" /></td>
    <td align="center"><input name="letterForm" type="radio" value="3" /></td>
    <td align="center"><input name="letterForm" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="letterFormTot"<cfif get.recordcount gt 0 and get.letterForm gt 0> value="<cfoutput>#get.letterForm#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Spacing</td>
    <td align="center"><input name="spacing" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="spacing" type="radio" value="2" /></td>
    <td align="center"><input name="spacing" type="radio" value="3" /></td>
    <td align="center" bgcolor="#999999">&nbsp;</td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="spacingTot"<cfif get.recordcount gt 0 and get.spacing gt 0> value="<cfoutput>#get.spacing#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Capitalization</td>
    <td align="center"><input name="capitalization" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="capitalization" type="radio" value="2" /></td>
    <td align="center"><input name="capitalization" type="radio" value="3" /></td>
    <td align="center"><input name="capitalization" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="capitalizationTot"<cfif get.recordcount gt 0 and get.capitalization gt 0> value="<cfoutput>#get.capitalization#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Sentences</td>
    <td align="center"><input name="sentenceStruct" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="sentenceStruct" type="radio" value="2" /></td>
    <td align="center"><input name="sentenceStruct" type="radio" value="3" /></td>
    <td align="center"><input name="sentenceStruct" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="sentenceStructTot"<cfif get.recordcount gt 0 and get.sentenceStruct gt 0> value="<cfoutput>#get.sentenceStruct#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td>Punctuation</td>
    <td align="center"><input name="puncuation" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="puncuation" type="radio" value="2" /></td>
    <td align="center"><input name="puncuation" type="radio" value="3" /></td>
    <td align="center"><input name="puncuation" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="puncuationTot"<cfif get.recordcount gt 0 and get.puncuation gt 0> value="<cfoutput>#get.puncuation#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
      <tr>
    <td>Spelling development</td>
    <td align="center"><input name="spellingDev" type="radio" value="1" checked="checked" /></td>
    <td align="center"><input name="spellingDev" type="radio" value="2" /></td>
    <td align="center"><input name="spellingDev" type="radio" value="3" /></td>
    <td align="center"><input name="spellingDev" type="radio" value="4" /></td>
    <td align="center">X1</td>
    <td align="center"><input type="text" name="spellingDevTot"<cfif get.recordcount gt 0 and get.spellingDev gt 0> value="<cfoutput>#get.spellingDev#</cfoutput>"<cfelse> value="1"</cfif> /></td>
  </tr>
  <tr>
    <td colspan="6" align="right"><strong>Conventions Total</strong></td>
    <td align="center"><input type="text" name="total4" id="total4"<cfif get.recordcount gt 0 and get.conventionTot gt 0> value="<cfoutput>#get.conventionTot#</cfoutput>"<cfelse> value="11"</cfif> /></td>
  </tr>
</table>
<br />
<table width="25%" border="0" align="center" cellpadding="2" cellspacing="2" style="border: solid; border-width: thin;">
  <tr>
    <td colspan="2"><strong>Total Scores</strong></td>
    </tr>
  <tr>
    <td align="right">Process Total:</td>
    <td align="right"><input type="text" name="t_total" id="t_total"<cfif get.recordcount gt 0 and get.processTot gt 0> value="<cfoutput>#get.processTot#</cfoutput>"<cfelse> value="3"</cfif> /></td>
    </tr>
  <tr>
    <td align="right">Genre Total:</td>
    <td align="right"><input type="text" name="t_total2" id="t_total2"<cfif get.recordcount gt 0 and get.genreTot gt 0> value="<cfoutput>#get.genreTot#</cfoutput>"<cfelse> value="3"</cfif> /></td>
    </tr>
  <tr>
    <td align="right">Strategy Total:</td>
    <td align="right"><input type="text" name="t_total3" id="t_total3" value="0"<cfif get.recordcount gt 0 and get.strategyTot gt 0> value="<cfoutput>#get.strategyTot#</cfoutput>"<cfelse> value="4"</cfif> /></td>
    </tr>
  <tr>
    <td align="right">Conventions Total:</td>
    <td align="right"><input type="text" name="t_total4" id="t_total4"<cfif get.recordcount gt 0 and get.conventionTot gt 0> value="<cfoutput>#get.conventionTot#</cfoutput>"<cfelse> value="7"</cfif> /></td>
    </tr>
  <tr>
    <td align="right">C4 Total:</td>
    <td align="right"><input type="text" name="grandtotal" id="grandtotal"<cfif get.recordcount gt 0 and get.c4total gt 0> value="<cfoutput>#get.c4total#</cfoutput>"<cfelse> value="17"</cfif> /></td>
    </tr>
      <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="Save Assessment Grid" /></td>
    </tr>
</table>
</form>
<cfinclude template="../footer.cfm">

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 52

Expert Comment

by:_agx_
ID: 36995843
I don't see duplicate "type" values. But that's a lot of code.  What are you doing when the error occurs. Also are you on a server where you can see the full error message - specifically the error line number or the stack trace?
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36995852
Also was this code "working" and you just modified it - or is it totally new code you're writing?
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 1000 total points
ID: 36995913
I tested the form code (without the queries) and no errors. So the problem's probably coming from somewhere else. Can you post the full error message?

> You should use cfqueryparam or at least val(initialEngTot) to prevent sql injection and errors

+1.  

In addition, you should scope your variables to prevent unintended scope collisions. But one thing at a time...
0
 
LVL 2

Author Comment

by:kallestie
ID: 36995930
Totally new code. The error is very vague, just what's in the title.
Picture-2.png
0
 
LVL 2

Author Comment

by:kallestie
ID: 36995976
The code was working. I am not sure why it doesn't now.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36995980
That's because you're using an error handler which deliberately only shows you the high level stuff. If it were a DEV site, I'd say disable the error handler.  But since it's PROD, email yourself a full dump of the error in your error handler page and/or check the log files.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36995991
>  The code was working. I am not sure why it doesn't now.

Well, you must have changed something ;) What did you change?
0
 
LVL 2

Author Comment

by:kallestie
ID: 36997445
It's weird...it still doesn't work. I can't find the error.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36997555
Well you should at least know what page you changed. Which page was it and what did you change (in general terms)?
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question