Copy link to clipboard
Copied
SQL = INSERT INTO dl.tbufprdf (product_code, fee_id) VALUES ('DFMBF,FUSEACTION', 'ABST')
Copy link to clipboard
Copied
You seriously need to work on the way you ask for help. How - for goodness sake - are we supposed to work out WTF you're on about, given only a statement that you're having a problem, and some bung SQL?
I'm guessing you're using <cfinsert>, My advice is to use <cfquery> and hand code your SQL, that way you don't fall victim of how useless a tag <cfinsert> is.
If you're already using <cfquery>... fix your SQL.
In future, post the relevant code, as well as some narrative describing what you need help with. Pls.
--
Adam
Copy link to clipboard
Copied
Sorry Adam just now I am Learing How to use forums.So exactly I dont know how to post it in a good way from next time I will try to represent in a good way.
when I am trying to insert values in a form it taking fuseaction as a field name with productname. How can I solve this ,I am using ListLast to insert the values.
FIELDNAMES=LEAD_DFMBF,
LF2_DFMBF,LTRE_DFMBF,MTG2_DFMBF,RLS3_DFMBF,STMP_DFMBF,TINS_DFMBF,LF1_DFMBF,CNCF_DFMBF,FASB_DFMBF,CNC2_DFMBF,CNC1_DFMBF,FUSEACTION.
I am getting error like this A string in the Update or Insert statement is too long for column.
SQL=Insert into tbufvalu(Product_id,Product_code) VALUES('ABST','DFMBF,FUSEACTION')
<cfloop list="#form.FIELDNAMES#" index="i" >
<cfif ListLen(i,'_') EQ 2>
<cfinoke component>
<cfinvokeargument name="fee_id" value="#ListFirst(form.FIELDNAMES,'_')#">
<cfinvokeargument name="product_code" value="#ListLast(form.FIELDNAMES,'_')#">
</cfinvoke>
Copy link to clipboard
Copied
Sorry Adam just now I am Learing How to use forums.So exactly I dont know how to post it in a good way from next time I will try to represent in a good way.
No problems. As a rule of thumb, if you have some problem with some code (as little as possible to get the point across; enough so that you get the point across without too much guesswork on our part ;-), you need to actually show us the code that you have the problem with, as well as actually describing what the problem is. Simply an error message or some SQL with no real explanation of the context of the situation is no use to anyone.
when I am trying to insert values in a form it taking fuseaction as a field name with productname. How can I solve this ,I am using ListLast to insert the values.
FIELDNAMES=LEAD_DFMBF,
LF2_DFMBF,LTRE_DFMBF,MTG2_DFMBF,RLS3_DFMBF,STMP_DFMBF,TINS_DFMBF,LF1_DFMBF,CNCF_ DFMBF,FASB_DFMBF,CNC2_DFMBF,CNC1_DFMBF,FUSEACTION.I am getting error like this A string in the Update or Insert statement is too long for column.
SQL=Insert into tbufvalu(Product_id,Product_code) VALUES('ABST','DFMBF,FUSEACTION')<cfloop list="#form.FIELDNAMES#" index="i" >
<cfif ListLen(i,'_') EQ 2>
<cfinoke component>
<cfinvokeargument name="fee_id" value="#ListFirst(form.FIELDNAMES,'_')#">
<cfinvokeargument name="product_code" value="#ListLast(form.FIELDNAMES,'_')#">
</cfinvoke>
Can you post the actual code. This is not the actual code, as there's synatx errors in it, so it would not run.
Also, logically, your <cfif listLen(i, '_') EQ 2> should exclude "fuseaction" anyhow.
Secondly, in your <cfinvokeargument> tags, shouldn't you be doing listFirst(i, "_"), not listFirst(form.FIELDNAMES, "_")? form.fieldnames isn't delimited by _, so I am guessing you want to split the actual individual field names in two..?
--
Adam