> k im helpin someone but im sick as a dog today and the theraflu has me 
> high as a kite, whoo hoo
> simple ?, i dont wanna think about at the moment
> 
> a user will upload a csv file that will be parsed, the data is like 
> such
> 
> Qty,Card Name
> 1,Zombie Trailblazer
> 7,Zombie Cutthroat
> 1,Zombie Brute
> 8,Zealous Inquisitor
> 15,Yotian Soldier
> 
> dont want first line of course, dont want the number nor the ,
> just the name thats bout all they need
> it will then loop though comparing each name to a db value 
> so in short just want the name, it could be 1-6 words in length
> the rest, i'll worry bout later
> tia 


You could try using CFHTTP.

>From livedocs.macromedia.com
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p58.htm#wp1632966
Building a query from a delimited text file

The cfhttp tag can create a ColdFusion query object form the response body. To 
do so, the response body must consist of lines of text, with each line having 
fields that are delimited by a character that identifies the column breaks. The 
default delimiter is a comma (,). The response data can also use a text 
qualifier; the default is a double quotation mark ("). If you surround a string 
field in the text qualifier, the field can contain the delimiter character. To 
include the text qualifier in field text, escape it by using a double 
character. The following line shows a two-line request body that is converted 
into a query. It has three comma-delimited fields:

Field1,Field2,Field3
"A comma, in text","A quote: ""Oh My!""",Plain text

Run the following code to show how ColdFusion treats this data:

<cfhttp method="Get"
   url="127.0.0.1:8500/tests/escapetest.txt"
   name="onerow">
<cfdump var="#onerow#"><br>

Column names can be specified in three ways:

    * By default, ColdFusion uses the first row of the response as the column 
names.
    * If you specify a comma-delimited columns attribute, ColdFusion uses the 
names specified in the attribute as the column names. Set 
firstRowAsHeaders="No" if the first row of the response contains data. 
Otherwise, ColdFusion ignores the first row.
    * If you do not specify a columns attribute and set firstrowasheaders="No", 
ColdFusion generates column names of the form Column_1, Column2, etc.

The cfhttp tag checks to ensure that column names in the data returned by the 
tag start with a letter and contain only letters, numbers, and underscores (_).

ColdFusion checks for invalid column names. Column names must start with a 
letter. The remaining characters can be letters, numbers, or underscores (_). 
If a column name is not valid, ColdFusion generates an error.

hth,

larry

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191312
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to