Obviously a logic error but I cannot be sure. I am a proponent of KISS.

On Mon, 22 Apr 2002, Janine Jakim wrote:

> I have a page that runs an update query.  It seems that sometimes the grades
> update incorrectly or will overwrite the wrong information. 
> 
> This is the query I use- does anyone see anything wrong/could cause this?
> TIA
> 
> <CFPARAM NAME="SubjectMark" DEFAULT="">
> <CFSET Courseset=CourseID>
> 
> <CFSET Courseset=#Courseset#-1>
> <CFTRANSACTION>
> <CFLOOP INDEX="X" FROM=1 TO="#ListLen(SubjectMark)#">
> <CFQUERY NAME="EditMarks" DATASOURCE="#Request.dsn#">
> UPDATE T_StudentMarks
> SET SubjectMark='#ListGetAt(attributes.SubjectMark,X)#'
> WHERE  StudentID='#StudentID#' and Quarter=#Quarter# And
> CourseID=#Evaluate(X + Courseset)#
> </CFQUERY>
> 
> </CFLOOP>
> </CFTRANSACTION>
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to