Skip to main content
Inspiring
August 25, 2008
Question

Datasource connection for TXT files

  • August 25, 2008
  • 2 replies
  • 421 views
In CF5 we were able to make a datasource connection to a TXT file, I think we could also do it in 7, but in CF8 there appears to be no option to do this? I set one up within Windows ODBC but CF8 does not see it, it seems that all datasources must be set up within CF8 administrator.

Could anybody tell me how I set up a TXT datasource in CF8?

Thanks

Mark
This topic has been closed for replies.

2 replies

Inspiring
August 27, 2008
Another neat trick is to call the file with cfhttp and use the name attibute to produce a query object. Then you can run a Q of Q.
Inspiring
August 27, 2008
If you are on a Windows machine, setup a data connection in the ODBC control panel on the machine itself first, then connect to it using the ODBC Socket option in the DB section of CF ADmin

Considering the advancement of XML data and other available data options, txt files are not used that much any longer. It would likely be just as fast to simply open the TXT file with CFFILE and parse it that way.