hai all
the first commented code will work fine. but here i am trying to insert the
values into table thru loop(because here, dynamically passing the field
values into tables) so i used 2 nd code to implement to my aim. and here one
problem is raising for me that i donno whether perticular field is numeric
or character. so based on that one i have to give 
condition. (see here in 1 st code, #form.txta1 is numeric and rest of the
fields are character types). 
how can i check the condition. because if it is character type then i have
to specify the variable's value with in the single quotes and vice versa for
if it is numeric. 
i am sure that my 2 nd code won't execute right now.
and can i specify the loop in the insert command?( i am not sure whether it
execute or not?)
plese can any body help me

thanx

Ramesh



1 st code
 <!--- <cfquery name="querya" datasource="#attributes.datasource#">
        Insert into #ATTRIBUTES.tablename#
        (#ATTRIBUTES.field1#,#ATTRIBUTES.field2#,
        #ATTRIBUTES.field3#,#ATTRIBUTES.field4#,
        #ATTRIBUTES.field5# )
    VALUES
        (#FORM.txta1#, '#FORM.txta2#', '#FORM.txta3#',
'#FORM.txta4#','#FORM.txta5#')
</cfquery>  --->




2 nd code
<cfquery name="queryac" datasource="#attributes.datasource#">
<cfloop from ="1" to ="#ln#" index="i">
        Insert into #ATTRIBUTES.tablename#
        (#evaluate("ATTRIBUTES.heading#i#")#)
    VALUES
        <cfif --------condition-------------    
        ("#FORM.txta#i#")
        <cfelse>
        ('"#FORM.txta#i#"')
        </cfif

</cfloop>

------------------------------------------------------------------------------
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.

Reply via email to