The only fix for the XLS vs. TXT (or whatever extension) is to check the
ListLast(cffile.filename, ".") against the extension you're looking for
(have to take case into consideration as well.
As for making sure all of the fields are there, in my situations I would
read the file in using CFFIle, do a list to array based on the CR/LF
character (CHR(13)CHR(10)) and then get a ListLen of the the array[1] using
the tab (chr(9) or whatever) *after* I replaced all instances of the
separator by adding in a space on either side of the separator. CF will
sometimes not read lists correctly if the delimiters are stacked one on
another.
Just food for thought, best of luck!
Hatton
_____
From: stas [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 1:16 PM
To: CF-Talk
Subject: customer list validation
Our application allows users to upload a list - a list of addresses in this
case. We expect certain fields to be there (obviously!).
What I am doing right now is:
Upload the list
Run a query against it (text DSN) and get the columns
Compare the columns to expected column list variable
I am wondering if there is a better or a more elegant way.
Related to this, we are also anticipating issues with users uploading wrong
file types, let's say .XLS instead of .TXT. Has anyone run accross a list
management/upload product (a custom tag or CFX) that deals with this and
above situations?
Thanks!
_____
[HYPERLINK "http://www.houseoffusion.com/lists.cfm?link=t:4"Todays Threads]
[HYPERLINK "http://www.houseoffusion.com/lists.cfm?link=i:4:148411"This
Message] [HYPERLINK
"http://www.houseoffusion.com/lists.cfm?link=s:4"Subscription] [HYPERLINK
"http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=2581.2460.4"Fast
Unsubscribe] [HYPERLINK "http://www.houseoffusion.com/signin/"User Settings]
_____
HYPERLINK "http://www.houseoffusion.com/banners/view.cfm?bannerid=17" \n
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.555 / Virus Database: 347 - Release Date: 12/23/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.555 / Virus Database: 347 - Release Date: 12/23/2003
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

