This is not available in CFMX. CFML Reference Guide
http://download.macromedia.com/pub/coldfusion/documentation/cfmx_cfml_refere
nce.pdf

This is what it has to tell about cfquery:

<cfquery
 name = "query_name"
 dataSource = "ds_name"
 dbtype = "query"
 username = "username"
 password = "password"
 maxRows = "number"
 blockFactor = "blocksize"
 timeout = "seconds"
 cachedAfter = "date"
 cachedWithin = "timespan"

 Either of the following:
 debug = "Yes" or "No"
 or:
 debug
 SQL statement(s) >
</cfquery>

New in ColdFusion MX: The connectString, dbName, dbServer, provider,
providerDSN, and sql attributes, and all values of the dbtype attribute
except query, are deprecated. Do not use them.


You can try this on Windows (replacing the mdb with csv)

<!---Include the ADO Defines file--->
<cfinclude template="adocfscript.cfm">

<!---Create the new "Conection Object" call it "MyObject"--->
<cfobject type="COM"
          name="MyObject"
          class="ADODB.Connection"
          action="CREATE">

<cfscript>
    //Use these variables to build a valid connection string
  Driver="Microsoft Access Driver (*.mdb)";
  DataBasePath="f:\database\northwinds.mdb";

  Source="Driver=#Driver#;DBQ=#DataBasePath#";

    //Open a connection to the "northwinds" database
  MyObject.Open("#Source#",
                 adModeUnknown,
                 adFailIfNotExists,
                 adOpenRecordUnspecified);

  WriteOutput("<h3>Success!!</h3>");
</cfscript>


<!--- Close --->
<cfset MyObject.Close()>


http://cfhub.com/advanced/ado/connection_string.cfm



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


I think I got the information from an MS page rather than a CF page.

> Persist Security Info

I feel it relates more to ODBC connection strings than to the text
driver specifically. But I'm just guessing...

> -----Original Message-----
> From: Michael Kear [mailto:mkear@;afpwebworks.com]
> Sent: Tuesday, 29 October 2002 4:47 p.m.
> To: CF-Talk
> Subject: RE: DSN-less connection to a CSV file?
>
>
> 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