If it's the same filename every time you could create an ODBC data
source using the Text driver - Then create a CF Odbc Socket datasource
(I'm assuming you're using MX and can't create DSN-Less datasources).
You can probably then just do something like....
<CFQUERY name="qdfInputFile" datasource="MyTextDriverDatasource">
Select top 1 * from [filename goes here]
</CFQUERY>
If the driver doesn't allow SELECT TOP you could try
<CFQUERY name="qdfInputFile" datasource="MyTextDriverDatasource"
Maxrows="1">
Select * from [filename goes here]
</CFQUERY>
Can't guarantee it will work though
Martin Parry
http://www.BeetrootStreet.com
-----Original Message-----
From: Jeremy Bunton [mailto:[EMAIL PROTECTED]
Sent: 03 December 2004 14:52
To: CF-Talk
Subject: <cffile read> to read JUST the top line of the txt file.
Hello,
I want to use <cffile> to read just the top line (header line with field
names) of a very large .csv file, say 5 million records. Is there a way
to
just read the top record into the variable in the cffile tag, with out
having to read the whole file.
Jeremy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186079
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54