there is also a sql command for this if your sql box can 'see the file' - check the docs
 
<CFQUERY DATASOURCE="#datasource1#">
 LOAD DATA INFILE '#v_input_file#'
 INTO TABLE myTable
 FIELDS TERMINATED BY '\t'
 LINES TERMINATED BY '\r\n';
 </cfquery>
 
 
Elliot
 
 
"rob" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...


i found this which is exactly what i want to do

http://www.defusion.com/articles/index.cfm?ArticleID=206


I have got it to work however it is having trouble counting the amount of arrays

this is the code that is being a pain....

<!--- Set the Record Count --->                
<cfset end_of_line = Chr(10)>
<cfset filepath = #getDirectoryFromPath(getbasetemplatepath())#>
<cffile action="" file="#filepath#calendar.csv" variable="DataFile">
                
<!--- Remove all single quotes --->                
<cfset clean_data_file = Replace(DataFile, "'", " ")>

<!--- Put the list into an Array --->
<cfset data_line_array = ListToArray(clean_data_file, end_of_line)>

<!--- Count the number of Arrays --->
<cfset arraycount = #ArrayLen(data_line_array)#>
<cfoutput>#arraycount#</cfoutput>


my file has over 1200 records however it is only when i run this i only get one.....

big problem!!!

thanks people

Rob.



Robert Shaw
Online Learning
[EMAIL PROTECTED]
MLC School
Rowley Street
Burwood 2134
Phone: 97471266
Mobile: 0422222515
Fax: 97453254
Robert Shaw
Online Learning
[EMAIL PROTECTED]
MLC School
Rowley Street
Burwood 2134
Phone: 97471266
Mobile: 0422222515
Fax: 97453254
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to