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

Help with MySQL

Guest
Jan 26, 2007 Jan 26, 2007

Copy link to clipboard

Copied

Hey Guys,

I am currently in the process of developing a website for a client. What my client would like to do is take their clients information from a database that they have in their offices and use that information on their website. They have the ability to export that information to a couple of different file types. 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 the text file. How do I then "parse" (is that the right term?) that data and insert it into my database?

Thank you in advance for your help!
TOPICS
Advanced techniques

Views

294

Translate

Translate

Report

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 ,
Jan 26, 2007 Jan 26, 2007

Copy link to clipboard

Copied

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" <webforumsuser@macromedia.com> wrote in message
news:epdb3o$o4d$1@forums.macromedia.com...
> Hey Guys,
>
> I am currently in the process of developing a website for a client. What
> my
> client would like to do is take their clients information from a database
> that
> they have in their offices and use that information on their website. They
> have
> the ability to export that information to a couple of different file
> types.
> 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
> the
> text file. How do I then "parse" (is that the right term?) that data and
> insert
> it into my database?
>
> Thank you in advance for your help!
>


Votes

Translate

Translate

Report

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 ,
Jan 26, 2007 Jan 26, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Jan 26, 2007 Jan 26, 2007

Copy link to clipboard

Copied

Hey Guys,

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.

Votes

Translate

Translate

Report

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 ,
Jan 26, 2007 Jan 26, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

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
Documentation