I'm trying to do an insert off of your example. It keeps throwing an error that
it doesn't understand "fields1."
Can you tell me where I might be going wrong? Thank you.


<!--- Example of looping through a tab delimited text file ---->
<cffile action="read" file="C:\web\LD\LTReview2005\admin\upload\inputDat a.txt"
variable="FileData">
<!--- use the appropriate row/field delimiters for your file --->
<cfset rowDelim = chr(13)&chr(10)>
<cfset fieldDelim = chr(9)>
<cfloop list="#FileData#" delimiters="#rowDelim#" index="currLine">
<!--- determine the number of fields in this record --->
<!--- using field delimiter tab character char(9) --->
<cfset fields = ListToArray(currLine, chr(9))>
<cfif ArrayLen(fields) eq 9>
<cfloop from="1" to="9" index="i">
<!--- output fields --->
<cfoutput>
<b>f#i#:</b> #fields#
</cfoutput>


<!--- Returns max_ID --->
<cfmodule template="../../CustomTags/Max_ID.cfm"
datasource="#application.DSN#" tablename="LTREmp" PrimaryKey="LTREmpID">


<!--- Insert to add a person to be reviewed. --->
<cfquery name="addEmployee" datasource="#application.DSN#" dbtype="ODBC">
INSERT INTO LTREmp
(LTREmpID, emplNo, empName, mgrEmplNo, HireDate, JobTitle, managerName,
orgCode, dept)
VALUES
(#Max_id#, '#fields1#', '#fields2#', '#fields3#',

<cfif #fields4# eq "">
null,
<cfelse>
#CreateODBCDate(fields4)#,
</cfif>

'#fields5#',
'#fields6#',
'#fields7#',
'#fields8#'
)
</cfquery>


</cfloop>
<br>
</cfif>
</cfloop>