Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I use a txt file as a database?

Guest
Mar 05, 2009 Mar 05, 2009
Hello!
I am needing to do some basic queries on a text file, as a database... I *think* I know how to do it from the query side... but I had to set up an environment to get this done, and cannot figure out how to enable the text file as the data source. My understanding is that it would involve creating an ODBC connection, but I'm stumped at this point and could use some quick help!

Could you give me the play-by-play info I need to set this up and be able to do queries on it?

Thank you ALL!

TOPICS
Database access
763
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2009 Mar 05, 2009
cfhttp with a name attribute might be simpler.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2009 Mar 05, 2009
Well... that would be awesome help if I knew anything about how to use that...
I'm under a sharp deadline, and although your suggestion probably is the answer (or *an* answer), I don't know how to use it at all... Any step-by-step help on how to do a query on a comma deliniated database file that is in txt format? ...I don't care what method, just need to know how to make something work... It's setup just like a database.. columns... etc. Help?

Thanks,
B
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2009 Mar 05, 2009
google "<cfhttp>".

The first offering should be the page from the cfml reference manual. Read the part about the name attribute. Then look at the example.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2009 Mar 05, 2009
LATEST
I've already done that... Having a hard time understanding it.

Let's say you have a text file with the following in it:

FName LName Phone City State
Bob Johnson 123-123-1234 Smalltown OH
Bill Edwards 123-123-4321 Bigcity NY
Kim Smith 312-123-1234 Nowhere IL

How would you, for example, select the cities from this 'table' in the text file? Or, if you've searched for "Bigcity" how would you display the other data from that record?

I'm sorry, but I'm needing that level of hand-holding with this one...


....And, if anybody knows anything about using the text files through ODBC, I need more of the help with the ODBC configuration and DSN assignment, than the queries...

At this point, any help will be huge!

Thanks!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources