Hai
This is dynamic update statement
Actucally if i take only 3 text boxes then no problem. but when i take 3rd
one is select box then getting problem.
here i am getting value from this variable #Evaluate("FORM.selecta#i#")# .
problem is when executing the cfquery command at 3 rd time, this select box
value is not passing in to update statement and giving the following error.
first two values are passing correctly. becos these are text boxes. and
output is coming like this. I think when control comes in 3 rd loop giving
the problem.
even i am seeing value of this variable if i give output as
#Evaluate("FORM.selecta3")# ,
can anybody help na.
Update student set sno = 99 WHERE sno = 99
Update student set sname = 'ramesh1' WHERE sno = 99
Bottom of Form 0
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the
keyword 'WHERE'.
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (110:3) to (110:43).
Date/Time: 06/25/00 19:12:22
Browser: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
Remote Address: 127.0.0.1
This is my code...........
<cfloop from ="1" to ="#ln#" index="i">
<cfif
#Evaluate("ATTRIBUTES.listfields.field_chara[#i#]")# EQ "0">
<cfif
#Evaluate("ATTRIBUTES.listfields.fieldoptionsa[#i#]")# NEQ "">
<CFSET values = values &
#Evaluate("FORM.selecta#i#")# & ",">
<cfelse>
<CFSET values = #evaluate("FORM.txt#i#")# >
</cfif>
<cfelse>
<cfif
#Evaluate("ATTRIBUTES.listfields.fieldoptionsa[#i#]")# NEQ "">
<CFSET values = values & "'" &
#Evaluate("FORM.selecta#i#")# & "',">
<cfelse>
<CFSET values = "'" &
#evaluate("FORM.txt#i#")# & "'">
</cfif>
</cfif>
<cfset
fieldv=#Evaluate("ATTRIBUTES.listfields.fielda[#i#]")#>
<cfquery name="queryu" datasource ="#ds#">
Update #ATTRIBUTES.listfields.tablename#
set #fieldv# = #preservesinglequotes(values)#
WHERE
#ATTRIBUTES.listfields.uniquefield# =
#attributes.id1#
</cfquery>
</cfloop>
Thanx
Ramesh
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.