> i have a csv file. Here is an example. (it is taken from messages > stored on > a phone). > 1,status,"","[EMAIL PROTECTED]","here is a messagemessage", 2001/10/16 (Tue) > 19:34,status > "",status,"","[EMAIL PROTECTED]","here is a messagemessage", > 2001/10/16 (Tue) > 19:34,status > > here are the csv rules. > > 1. comma is the primary delimeter > 2. doulbe quotes (") is the text qualifier (but for some reason it isnt > always present for all fields, like date. > 3. if there is a doulbe quote in the text it is escaped ("") > 4. line breaks may be in the message, as well as commas > > I can open this in excel or access just fine, but i am having serious > problems writing an intelligent script that will be ok if there are commas > or doulbe quotes in a block of text. > > I tried using CFX_CSVToQuery however it produced errors on the > first row and > wouldnt continue (no matter what the settings). > > I need to automate the process for the client and have an upload form. > > The horrible thing is that i am a week overdue, the whole site > interface has > been done - i am just stuck on the csv to database part. If i dont get it > done the whole project will be in a bit of trouble. > > anyhelp would be really appreciated.
Have you tried using the Text ODBC driver? It usually opens the files as normal CSVs and you don't have to worry about using CFFile (or CSX_ tags) as you can use it as a datasource Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists