This content has been marked as final. Show 4 replies
You can output a CSV doc and then use cfhttp to grab it and turn it into a
query and loop it into the table
"Woody1980" <firstname.lastname@example.org> wrote in message
> Hey Guys,
> I am currently in the process of developing a website for a client. What
> client would like to do is take their clients information from a database
> they have in their offices and use that information on their website. They
> the ability to export that information to a couple of different file
> What I have played around with so far is a tab delimited text file. I have
> written a ColdFusion (MX7) page using <cffile action="read"> which gets
> text file. How do I then "parse" (is that the right term?) that data and
> it into my database?
> Thank you in advance for your help!
Tab is probably a better delimiter than comma, because comma is more likely to occur in the data. You can use cfhttp to convert any delimited file to a query, not just csv files.
Thank you very much for replying so quickly. Can you please look at the attached code to see if I am on target here? When my client exported the tab delimited file he included the headers. Will this new query recognize those headers as variables that I can output? Such as #Account#? What I am getting now is a http 500 error when I try to test it. (By the way I am using CFMX7 Developer)
Thanks for you help guys. I only began programming with coldfusion about 6 months ago and I have come pretty far. But when it comes to this I am hitting a road block.
I've only done it a couple of times at most. The approach was to use cffile to upload and read the file, and cfhttp to turn it into a query.