473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Insert records on FTP server database

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?
Apr 7 '06 #1
4 1514
Why are you using ftp, sounds ideally suited to an http upload and download.

--
Regards

John Timney
Microsoft MVP

"sparty1022" <sp********@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
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?

Apr 7 '06 #2
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" <sp********@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
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?


Apr 7 '06 #3
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" <sp********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
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" <sp********@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
> 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?


Apr 7 '06 #4
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?

Apr 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: shank | last post by:
I have a recordset that contains multiple records of product a user is purchasing. For clarity, I converted the recordset fields to variables. I need to take that entire recordset and insert it...
2
by: george | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, on an NT box, Active Server pages with Javascript, using ADO objects. ...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
10
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void...
4
by: Danny Smith | last post by:
Can anyone help? I want to find the fastest way of inserting a large number of records (50,000+) into a SQL Server database (using C#). The records are held in memory and the options I can...
5
by: Brad Baker | last post by:
I'm trying to write a simple asp.net page which updates some data in a SQL database. At the top of the page I have the following code: <%@ Page Language="C#" Debug="true" %> <%@ import...
8
by: nano2k | last post by:
Hi Shortly, I keep invoices in a table. Occasionally, someone will fire the execution of a stored procedure (SP) that performs several UPDATEs against (potentially) all invoices OLDER than a...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.