Thanks Matthew!  That looks exactly like what I'm needing.  Is there any
documentation anywhere about DSNless connections?   For example, I'd be
interested to know what the Persist Security Info parameter does.  I presume
that is what makes the server hold on to the connection or not but it'd be
nice to be able to know for sure.

Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks


-----Original Message-----
From: Matthew Walker [mailto:Matthew@;cabbagetree.co.nz]
Sent: Tuesday, 29 October 2002 2:34 PM
To: CF-Talk
Subject: RE: DSN-less connection to a CSV file?

This is how we've been doing it:

<cfset ConnectString = "Driver={Microsoft Text Driver (*.txt;
*.csv)};Dbq=#fulldirectorypath#;Extensions=txt,csv;Persist Security
Info=False;">

<CFQUERY NAME="Log" DBType="dynamic" ConnectString="#ConnectString#">
        SELECT  *
        FROM            [#file#]
        ORDER BY        myColumn
</CFQUERY>

fulldirectorypath is the directory not the file. file is the filename
excluding the extension.

Matthew Walker
http://www.matthewwalker.net.nz/




> -----Original Message-----
> From: Michael Kear [mailto:mkear@;afpwebworks.com]
> Sent: Tuesday, 29 October 2002 4:22 p.m.
> To: CF-Talk
> Subject: DSN-less connection to a CSV file?
>
>
> I have an information provider FTP'ing a series of .csv files
> into my server
> every night, and I need to use these files to create dynamic
> tables for
> users.   Since they are updated every day, I can't have them
> locked and in
> use when the provider's automatic ftp dumps them into my site.
>
> So what I wanted to do was set my calculator up so that when
> my site user
> calls the information, the page connects to the .csv table,
> does the query
> then disconnects again.
>
> Is this (a) possible?  (b) the best way to access (only read
> - not write or
> update) the .csv files so that they are not locked when the
> ftp program
> comes to drop new ones on the server?   If so, can someone
> please give me
> the code to connect to the .csv file?
>
> (we're using CF5)   There's no documentation at all about
> dsnless connection
> in the docs, and I haven't been able to find any thing in the
>  archives of
> this list or any other.
>
>
> Cheers,
> Mike Kear
> Windsor, NSW, Australia
> AFP WebWorks
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to