Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Insert records on FTP server database

Reply
Thread Tools

Insert records on FTP server database

 
 
=?Utf-8?B?c3BhcnR5MTAyMg==?=
Guest
Posts: n/a
 
      04-07-2006
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?
 
Reply With Quote
 
 
 
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      04-07-2006
Why are you using ftp, sounds ideally suited to an http upload and download.

--
Regards

John Timney
Microsoft MVP

"sparty1022" <> wrote in message
news:97F90BD2-82C4-46CA-ACF6-...
> 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?



 
Reply With Quote
 
 
 
 
=?Utf-8?B?c3BhcnR5MTAyMg==?=
Guest
Posts: n/a
 
      04-07-2006
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:97F90BD2-82C4-46CA-ACF6-...
> > 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?

>
>
>

 
Reply With Quote
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      04-07-2006
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...ileupload.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:7EEA650C-8837-443E-A225-...
> 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:97F90BD2-82C4-46CA-ACF6-...
>> > 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?

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?UGhhdFQ=?=
Guest
Posts: n/a
 
      04-08-2006
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Multiple Records Using One Insert Statemen with MySQLdb module anton.ranieri.it@gmail.com Python 1 12-06-2008 12:47 PM
Manual Insert, Edit MS Access Database Records MA P ASP .Net 0 09-01-2006 06:38 AM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM
Submit Form Elements to Insert Multiple Records into a Database Sans Spam ASP General 8 05-24-2004 09:16 PM
Insert records into database based on query Andrew Bourne ASP .Net 2 10-19-2003 09:40 AM



Advertisments
 



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