Well, Dusty, the blog entry I'd pointed to (in a note on Monday) was from 2002. It uses a feature (from CF5, no longer available) to do DSN-less connections, thus the connectstring.
Instead, use the more recent entry by Mark Kruger, which I pointed to below in a more recent note. Also, what about the more significant point I was making: that your attempt to use CFHTTP with a csv file failed (when a txt worked) because of a likely web server problem? PS Thanks, Shane, for your thoughts on the other thread. /charlie From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Dusty Hale Sent: Thursday, March 12, 2009 8:56 AM To: discussion@acfug.org Subject: Re: re[2]: [ACFUG Discuss] excel or csv to database table Hi Charlie and many thanks for the good advice. I got curious about running real queries on text files. I have done this some years ago using a DSN. I looked over your blog post on the zip code data. When I try to use this approach though I get the following error that the attribute "connectstring" does not exist for the cfquery tag (strange). The tag does not have an attribute called connectstring. The valid attribute(s) are name, datasource, dbtype, sql, username, password, maxrows, blockfactor, timeout, dbname, cachedafter, cachedwithin, result, debug. On Mon, Mar 9, 2009 at 6:54 PM, Charlie Arehart <char...@carehart.org> wrote: Dusty, I wonder if your problem isn't a CF one, but a web server one. I'd bet when you try to retrieve the file as a CSV, the web server steps in and changes the mime type to something other than plain text, and therefore CF (and the CFHTTP) gets something other than what they expected. (BTW, that code you show below doesn't come from my site, per se, but maybe you got it from a link off of it). I just ran a test of some working code (adapted from an example Ben Nadel put together). It works fine for me, whether file is called .txt or .csv. I've attached the files here. Do they work for you (may need to adjust the url in the cfm page)? If not, then I'd think the web server is your issue. (You could also request the CSV in your browser, or-to remove browser processing from the analysis--do your CFHTTP without the NAME attribute, which then just reads it as a text file. Dump the entire CFHTTP scope, to see the cfhttp.mimetype. Anyway, here's a simpler way to read in a CSV as a database (one I do link to from my CF411 site, and which would be easier than the older approach I mentioned in my last note), which doesn't rely on CFHTTP or then get bothered by any web server mapping issues: http://www.coldfusionmuse.com/index.cfm/2007/2/5/csv Hope that's helpful. /charlie ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------