Along the same vein, you could try a bulk insert into your database (SQL
Server does this rather easily - check your database docs) and then query
the table in the same manner Barry suggested.

FYI MX doesn't seem to have the Merant driver.


-----Original Message-----
From: Zachary S. Bedell [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 2:48 PM
To: CF-Talk
Subject: RE: Fastest way to convert a csv file to cf array/query?


> Using MX anyone have any ideas on a really fast way to
> convert a large (200-500k) cvs file into a CF complex data
> type like a query or array?
>
> "Barry Manilow","Dr. Sholz","[EMAIL PROTECTED]"

CF5 came with the Merant ODBC driver for text files.  I don't have a
machine handy that has MX but never had CF5, so I can't be 100% sure
they're still included with CFMX.

If you have access to those drivers, they've VERY fast.  I tried a
variety of CF and CFX methods for reading and parsing a text file, but
nothing has come even close to the speed of the Merant driver.  Since
it's an ODBC driver, you use CFQUERY like any other datasource; so it's
automatically a query ready for you to use.

I've used the Merant driver to parse CSV files up to 20MB in size, and
CF has chugged though it without any problems.  A 500k file should take
only a few seconds to read in.

Setting up the data format takes a little time as you need to create an
INI file for the driver.  You can use the ODBC control panel to setup
the format semi-automaticaly.  It's a bit less than crystal clear, but I
found the helpfile for the driver had enough info to figure it out.

Best regards,
Zac Bedell


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to