Balazs said:
"When I try to create a simulated query with null values the tag crashes.
The
reason seems to be that CF treats a list like "|||" not as a list of 4 blank
values but as a list of 0 values. Furthermore, a list like "v1|v2||" is not
treated as a list of four but as a list of two."
I recommend something like this:
Modify the custom tag to recognize the value NULL and special-case it.
<!--- add a row to the query --->
<cfset QueryAddRow( aQuery )>
<cfset colNum = 0>
<cfloop list="#myColumnList#" delimiters="," index="mycolumn">
<cfset colNum = colNum + 1>
<!--- extract the data from the |-delimited string --->
<cfset data = ListGetAt(thisLineData, colNum, "|")>
<!--- set the data to a null string if the data is literally "NULL"
(case-sensitive) --->
<cfif compare(data, "NULL") EQ 0>
<cfset data = "">
</cfif>
<!--- add the data element to the query --->
<cfset QuerySetCell(aQuery, mycolumn, data)>
</cfloop>
I haven't tested the code above. It's just there as an example. Hope this
helps.
Adam
"The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message
and its attachments could have been infected during transmission. By
reading the message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. The sender is not liable for any loss or damage arising in
any way from this message or its attachments."
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]
T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================