Insert records on FTP server database

Discussion in 'ASP .Net' started by =?Utf-8?B?c3BhcnR5MTAyMg==?=, Apr 7, 2006.

  1. we are constructing a (sql 2005) database on an FTP server where we will need
    to insert records into the tables. At this point our ftp scripts will allow
    us to upload/download documents/file from the server.

    We will be getting comma delimited records that must be inserted into the
    database. I haven't seen anyone with an example of how this task might be
    accomplished. Any one have and Idea? Does this sound like something that can
    be done with streamreaders/writers?
     
    =?Utf-8?B?c3BhcnR5MTAyMg==?=, Apr 7, 2006
    #1
    1. Advertising

  2. Why are you using ftp, sounds ideally suited to an http upload and download.

    --
    Regards

    John Timney
    Microsoft MVP

    "sparty1022" <> wrote in message
    news:...
    > we are constructing a (sql 2005) database on an FTP server where we will
    > need
    > to insert records into the tables. At this point our ftp scripts will
    > allow
    > us to upload/download documents/file from the server.
    >
    > We will be getting comma delimited records that must be inserted into the
    > database. I haven't seen anyone with an example of how this task might be
    > accomplished. Any one have and Idea? Does this sound like something that
    > can
    > be done with streamreaders/writers?
     
    John Timney \( MVP \), Apr 7, 2006
    #2
    1. Advertising

  3. Thank you John, consider this an oportunity to teach/inform.
    I started with the FTP because that was the example I found in a book and
    what I found on this site.
    What makes the difference? Where is a link to an article explaining the
    difference? Which is easier to use?

    "John Timney ( MVP )" wrote:

    > Why are you using ftp, sounds ideally suited to an http upload and download.
    >
    > --
    > Regards
    >
    > John Timney
    > Microsoft MVP
    >
    > "sparty1022" <> wrote in message
    > news:...
    > > we are constructing a (sql 2005) database on an FTP server where we will
    > > need
    > > to insert records into the tables. At this point our ftp scripts will
    > > allow
    > > us to upload/download documents/file from the server.
    > >
    > > We will be getting comma delimited records that must be inserted into the
    > > database. I haven't seen anyone with an example of how this task might be
    > > accomplished. Any one have and Idea? Does this sound like something that
    > > can
    > > be done with streamreaders/writers?

    >
    >
    >
     
    =?Utf-8?B?c3BhcnR5MTAyMg==?=, Apr 7, 2006
    #3
  4. ftp (http://www.w3.org/Protocols/rfc959/) is a bit of a funky protocol
    usually running on server port 21 and typically requires an ftp client, but
    there are some good components for browser based solutions such as:

    http://www.dart.com/samples/ftpdotnet.asp

    http upload (http://www.faqs.org/rfcs/rfc1867.html) is probably much better
    suited to what your describing as there is a control in asp.net specifically
    for this, and very easy to use - needs no client as it works in a browser
    over port 80 and can be secured easily over https. Also, its one less
    protocol to expose on your webserver, so less out of the box risk.

    http://www.asp.net/QuickStart/aspnet/doc/ctrlref/standard/fileupload.aspx

    Upload your files and save them locally, parse them and stick them in the DB
    on the server all in the same script. Should take you about 20 minutes to
    write........lol (only kidding) - but there are some good csv parsing
    examples

    http://www.codeproject.com/cs/database/CsvReader.asp

    --
    Regards

    John Timney
    Microsoft MVP

    "sparty1022" <> wrote in message
    news:...
    > Thank you John, consider this an oportunity to teach/inform.
    > I started with the FTP because that was the example I found in a book and
    > what I found on this site.
    > What makes the difference? Where is a link to an article explaining the
    > difference? Which is easier to use?
    >
    > "John Timney ( MVP )" wrote:
    >
    >> Why are you using ftp, sounds ideally suited to an http upload and
    >> download.
    >>
    >> --
    >> Regards
    >>
    >> John Timney
    >> Microsoft MVP
    >>
    >> "sparty1022" <> wrote in message
    >> news:...
    >> > we are constructing a (sql 2005) database on an FTP server where we
    >> > will
    >> > need
    >> > to insert records into the tables. At this point our ftp scripts will
    >> > allow
    >> > us to upload/download documents/file from the server.
    >> >
    >> > We will be getting comma delimited records that must be inserted into
    >> > the
    >> > database. I haven't seen anyone with an example of how this task might
    >> > be
    >> > accomplished. Any one have and Idea? Does this sound like something
    >> > that
    >> > can
    >> > be done with streamreaders/writers?

    >>
    >>
    >>
     
    John Timney \( MVP \), Apr 7, 2006
    #4
  5. Just to make sure we understand the whole thing. You *Must* have a UI for
    this? AND You *Must* immediately have the file imported?

    Reason asking... It is routine where I work for SQL DTS packages to BOTH
    fetch files (using Secured FTP) as well as import them into the db. If a ui
    is required, but timing is not as important, you could still have a DTS just
    pick up the files.

    We like to do files in pairs. The data file followed by a trigger file.
    The receiving process waits for the trigger file to exist, then imports the
    data file, and deletes only the trigger file. This way you aren't destroying
    the data, or wasting time/space copying it to a temporary backup.

    Just exploring the process more.

    "sparty1022" wrote:

    > we are constructing a (sql 2005) database on an FTP server where we will need
    > to insert records into the tables. At this point our ftp scripts will allow
    > us to upload/download documents/file from the server.
    >
    > We will be getting comma delimited records that must be inserted into the
    > database. I haven't seen anyone with an example of how this task might be
    > accomplished. Any one have and Idea? Does this sound like something that can
    > be done with streamreaders/writers?
     
    =?Utf-8?B?UGhhdFQ=?=, Apr 8, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Bourne

    Insert records into database based on query

    Andrew Bourne, Oct 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    528
    Andrew Bourne
    Oct 19, 2003
  2. MA P
    Replies:
    0
    Views:
    459
  3. Replies:
    1
    Views:
    1,831
    Albert Hopkins
    Dec 6, 2008
  4. Sans Spam
    Replies:
    8
    Views:
    272
    Sans Spam
    May 24, 2004
  5. D. Buck
    Replies:
    2
    Views:
    539
    D. Buck
    Jun 29, 2004
Loading...

Share This Page