|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
display text file list in cfloop containing blank spaces
I've pulled a comma delimited text file with approx 60k entries into a cfm page with CFFILE READ. Now I am trying to cfloop the data so I can insert these records into an SQL database. But, when I try to use the following, it hangs up because there are blank spaces in some of the fields. I need these fields to remain blank, so I cant use blank holders. This is frustrating!!!
<cfoutput> <CFFILE ACTION="READ" FILE="C:\Inetpub\wwwroot\Application\uploads\#file#" VARIABLE="ImpFile"> <cfloop index="rc" list="#ImpFile#" delimiters="#Chr(10)#"> <cfset ListRecord = listtoarray(rc,",")> <cfloop index="i" from="1" to="#arraylen(ListRecord)#"> <cfset cust_id = #ListRecord[1]#> <cfset title = #ListRecord[2]#> <cfset fname = #ListRecord[3]#> <cfset middle = #ListRecord[4]#> <cfset lname = #ListRecord[5]#> <cfset suffix = #ListRecord[6]#> <cfset email = #ListRecord[7]#> #ListRecord[i]# </cfloop> <br> </cfloop> </cfoutput> |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > display text file list in cfloop containing blank spaces |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|