Thanks for you replies, however 2 errors have occurred, 1 for each solution.
I apologize for not letting you know what I am running here.
* I am using ColdFusion Studio 5 w/Server (5)
* I am using SQL Server 2000 as my database as the destination for the data in my text file.
* My OS is Windows 2000 Professional
========================================
Query Solution:
I setup the ODBC connection as specified, but when I am inside of CF Studio and I click on the table under my newly created data source name while in the Database Resource Tab, the following error message appears:
The Table Fields could not be retrieved do to an error:
Error –1 occurred: ODBC Error Code = S1C00 (Driver Not Capable)
[Microsoft] [ODBC Text Driver] Optional Feature Not Implemented
I also setup the ODBC connection from both Windows (Admin) and ColdFusion (Server) to see if that had anything to do with the problem, but the error resulted for each method. I removed the existing connection before I attempted the alternative method of setting up the connection.
========================================
##########################################
========================================
CFLOOP & CFFILE Solution:
The solution worked just fine, however there are 4 columns of text in my text file. I tried tweaking your snippet to suit the 4 columns where as your snippet was setup for 3 and got the following error message:
Error Diagnostic Information
An error occurred while evaluating the expression:
fourthColumn = ListGetAt("#whichLine#",4)
Error near line 27, column 9.
--------------------------------------------------------------------------------
In function ListGetAt(list, index [, delimiters]) the value of index, which is 4, is not a valid index for the list given as a the first argument (this list has 3 elements). Valid indexes are in the range 1 through the number of elements in the list
My Script looks like this:
<CFSET myCRLF = Chr(13) & Chr(10)>
<cffile action="READ" file="C:\Inetpub\
variable="mybook">
<cfloop index="whichLine" list="#mybook#" delimiters="#myCRLF#">
<CFSET firstColumn = ListGetAt("#whichLine#",1)>
<CFSET secondColumn = ListGetAt("#whichLine#",2)>
<CFSET thirdColumn = ListGetAt("#whichLine#",3)>
<CFSET fourthColumn = ListGetAt("#whichLine#",4)>
<CFQUERY NAME="insertData" DATASOURCE="MyDsn">
INSERT INTO tblTestFoo (col1, col2, col3, col4)
VALUES ('#firstColumn#', '#secondColumn#', '#thirdColumn#', '#fourthColumn#')
</CFQUERY>
</cfloop>
========================================
Any Suggestions?
Thanks Again