Professional Web Applications Themes

FTP Text to DB - ASP Database

Hi and thanks in advance. I'm looking for some help for the following; A text file needs to be FTP'd to a site and then the contents of that txt file needs to be inserted into a db, either on the fly or at a set time. The part I'm having probs with is the inserting the txt contents into the db. The txt file will always be the same format and data within will change. Old data can be wiped out as the new txt will have all the current info. eg of txt file: (this is not the ...

  1. #1

    Default FTP Text to DB

    Hi and thanks in advance.

    I'm looking for some help for the following;

    A text file needs to be FTP'd to a site and then the contents of that
    txt file needs to be inserted into a db, either on the fly or at a set
    time.

    The part I'm having probs with is the inserting the txt contents into
    the db. The txt file will always be the same format and data within will
    change. Old data can be wiped out as the new txt will have all the
    current info.

    eg of txt file: (this is not the real data but for arguemant sacks, lets
    say it is.)

    ProdName
    ProdDescription
    Price
    SalePrice

    DB will either be MS Access or MySQL. I've not yet decided until I see
    the data and know the size.

    The question is, can someone point me in the right direction? I seem to
    be going round in circles with no answer to show for it.

    Cheers
    Steph.

    Steph Guest

  2. #2

    Default Re: FTP Text to DB

    On Wed, 11 Aug 2004 12:44:18 +1000, Steph <stephscartdesign.com.au>
    wrote:
    >Hi and thanks in advance.
    >
    >I'm looking for some help for the following;
    >
    >A text file needs to be FTP'd to a site and then the contents of that
    >txt file needs to be inserted into a db, either on the fly or at a set
    >time.
    >
    >The part I'm having probs with is the inserting the txt contents into
    >the db. The txt file will always be the same format and data within will
    >change. Old data can be wiped out as the new txt will have all the
    >current info.
    >
    >eg of txt file: (this is not the real data but for arguemant sacks, lets
    >say it is.)
    >
    >ProdName
    >ProdDescription
    >Price
    >SalePrice
    >
    >DB will either be MS Access or MySQL. I've not yet decided until I see
    >the data and know the size.
    >
    >The question is, can someone point me in the right direction? I seem to
    >be going round in circles with no answer to show for it.
    >
    >Cheers
    >Steph.
    ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
    I do this a lot. i set up a script that automatically ftp's a text
    file to a location on a web server. I link the text file as a table
    in an access d/b. Every time the file is ftp'd, it over writes the
    previous file, and the data is therefore automatically updated.

    The key to it all is to link the file and not import it.

    Larry Rekow
    - - - - - - - - - - - - - - - - - -
    "Forget it, Jake. It's Chinatown."
    Larry Rekow Guest

  3. #3

    Default Re: FTP Text to DB

    God dam!!!!

    Here I was looking at all these wiz bang ways and it's that simple.

    I need to simplify my thinking, but when searching the net, it's easy to
    lose site of the true goal.

    Thanks heaps for that too.

    Cheers
    Steph.

    Larry Rekow wrote:
    > On Wed, 11 Aug 2004 12:44:18 +1000, Steph <stephscartdesign.com.au>
    > wrote:
    >
    >
    >>Hi and thanks in advance.
    >>
    >>I'm looking for some help for the following;
    >>
    >>A text file needs to be FTP'd to a site and then the contents of that
    >>txt file needs to be inserted into a db, either on the fly or at a set
    >>time.
    >>
    >>The part I'm having probs with is the inserting the txt contents into
    >>the db. The txt file will always be the same format and data within will
    >>change. Old data can be wiped out as the new txt will have all the
    >>current info.
    >>
    >>eg of txt file: (this is not the real data but for arguemant sacks, lets
    >>say it is.)
    >>
    >>ProdName
    >>ProdDescription
    >>Price
    >>SalePrice
    >>
    >>DB will either be MS Access or MySQL. I've not yet decided until I see
    >>the data and know the size.
    >>
    >>The question is, can someone point me in the right direction? I seem to
    >>be going round in circles with no answer to show for it.
    >>
    >>Cheers
    >>Steph.
    >
    > ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
    > I do this a lot. i set up a script that automatically ftp's a text
    > file to a location on a web server. I link the text file as a table
    > in an access d/b. Every time the file is ftp'd, it over writes the
    > previous file, and the data is therefore automatically updated.
    >
    > The key to it all is to link the file and not import it.
    >
    > Larry Rekow
    > - - - - - - - - - - - - - - - - - -
    > "Forget it, Jake. It's Chinatown."
    Steph Guest

  4. #4

    Default Re: FTP Text to DB


    If you link the TXT as a table, then you must upload the whole table with
    all the products??
    And if you do so, and the txt have always the same format, why not opening
    the TXT in ado directly?

    I upload only the updated products (in xml format), run every 15 mnutes a
    script in Cron, update the db.
    You can use 1 txt for 1 product or all the updated product in 1 file

    My txt looks like:

    <product>
    <action>A</action> (can be D for Delete, A for add, U for update)
    <productId>109</productId>
    <productName>Cheese<productName>
    .....
    </product>

    John


    John Guest

Similar Threads

  1. Replies: 6
    Last Post: September 9th, 10:03 AM
  2. #38805 [NEW]: PDO Truncates Text from SQL Server Text Data Type Field
    By gkrajci at arescorporation dot com in forum PHP Bugs
    Replies: 13
    Last Post: October 14th, 10:31 PM
  3. Coursebuilder - 5 text areas for 5 possible scores. Eachpossible answer has its own text area
    By seaweed2323 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: June 27th, 04:20 AM
  4. current selected text to highlighted text on mouse up event through java script
    By mandal.tanmay@gmail.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: February 8th, 12:09 PM
  5. text field including text from a text file *.txt
    By Bernd Bach in forum Macromedia Flash
    Replies: 0
    Last Post: April 13th, 09:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139