PC Review


Reply
Thread Tools Rate Thread

Automating an upload of data

 
 
=?Utf-8?B?QWRyaWFuIEpvbmVz?=
Guest
Posts: n/a
 
      5th Feb 2007
Hi,

I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?

The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.

Thanks!
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      5th Feb 2007
Doesn't look like a good task for asp.net. Asp.net is a technology for
building web pages in response to client requests. In your case, who needs a
web page? Who is the client for asp.net? What are the advantages of doing it
in asp.net as opposed to a regular windows scheduled task or a windows
service?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Adrian Jones" <(E-Mail Removed)> wrote in message
news:FF22E277-54AE-4477-983A-(E-Mail Removed)...
> Hi,
>
> I need to regularly check an FTP folder for the presence of a file, and if
> found, run a routine.
>
> Given that this is all on our ISP's servers, what is the best way to
> automate such a routine in ASP.NET?
>
> The end target of the routine is likely to be a MySQL database. If we were
> using SQL Server, I assume I could use DTS to trigger the process, but I'm
> fairly ignorant of MySQL.
>
> Thanks!



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      5th Feb 2007
"Adrian Jones" <(E-Mail Removed)> wrote in message
news:FF22E277-54AE-4477-983A-(E-Mail Removed)...

> I need to regularly check an FTP folder for the presence of a file, and if
> found, run a routine.
>
> Given that this is all on our ISP's servers, what is the best way to
> automate such a routine in ASP.NET?


Well, any time you need to check for something on a regular basis and carry
out some processing based on the results of that check without user
intervention, a Windows service is almost always the right solution.
However, I'm assuming from the fact that you mention your ISP's servers,
that you're not able to deploy a Windows service on them...?

The "problem" with ASP.NET of course, in this particular instance, is that
your web app will stop when the last session terminates... This makes it
difficult to guarantee that your process will run 24/7. There are ways and
means to get round this, but these are hacks at best...

You mention that this regular check involves FTP - therefore, does it
actually need to be done through ASP.NET at all...? If you can access the
FTP site from outside your ASP.NET app, wouldn't it be easier to write a
Windows service and deploy it on another machine...?

> The end target of the routine is likely to be a MySQL database. If we were
> using SQL Server, I assume I could use DTS to trigger the process, but I'm
> fairly ignorant of MySQL.


If your ISP supports MySQL v5.1.6 or later, you can simply create an event:
http://dev.mysql.com/tech-resources/...t-feature.html


 
Reply With Quote
 
Aidy
Guest
Posts: n/a
 
      5th Feb 2007
asp isn't suited to such a task as asp code only runs when the page is
requested. Typically you'd use a service for this, or if you have control
over some other machine then that machine would run a scheduled task to
request a page on your web server that checks the folder.

"Adrian Jones" <(E-Mail Removed)> wrote in message
news:FF22E277-54AE-4477-983A-(E-Mail Removed)...
> Hi,
>
> I need to regularly check an FTP folder for the presence of a file, and if
> found, run a routine.
>
> Given that this is all on our ISP's servers, what is the best way to
> automate such a routine in ASP.NET?
>
> The end target of the routine is likely to be a MySQL database. If we were
> using SQL Server, I assume I could use DTS to trigger the process, but I'm
> fairly ignorant of MySQL.
>
> Thanks!



 
Reply With Quote
 
=?Utf-8?B?QWRyaWFuIEpvbmVz?=
Guest
Posts: n/a
 
      5th Feb 2007
I think what I really meant to say was, which of the technologies available
to me will help me automate this.

Looks like the MySQL events option, or a web service are the ways to go.

I'll have to find out if our ISP allows a web service.

Thanks to all for your speedy help!
 
Reply With Quote
 
Neil
Guest
Posts: n/a
 
      23rd Feb 2007
Hi Adrian,

You can easily write a script (well, it needs 2 actually) to interrogate the
ftp folder, and upload the file to your local computer, and then run the
routine on it.

The first script fires an ftp session, the second script does the upload.

Once created, set a Scheduled Task to call it as often as you require.

I do this every night and then process the data locally with VB, but the app
can be of your choosing.

NEIL


"Adrian Jones" <(E-Mail Removed)> wrote in message
news:FF22E277-54AE-4477-983A-(E-Mail Removed)...
> Hi,
>
> I need to regularly check an FTP folder for the presence of a file, and if
> found, run a routine.
>
> Given that this is all on our ISP's servers, what is the best way to
> automate such a routine in ASP.NET?
>
> The end target of the routine is likely to be a MySQL database. If we were
> using SQL Server, I assume I could use DTS to trigger the process, but I'm
> fairly ignorant of MySQL.
>
> Thanks!



 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      23rd Feb 2007
On Feb 23, 9:56 am, "Neil" <n...@NOSPAMPLEASE.eu> wrote:
> Hi Adrian,
>
> You can easily write a script (well, it needs 2 actually) to interrogate the
> ftp folder, and upload the file to your local computer, and then run the
> routine on it.
>
> The first script fires an ftp session, the second script does the upload.
>
> Once created, set a Scheduled Task to call it as often as you require.
>
> I do this every night and then process the data locally with VB, but the app
> can be of your choosing.
>
> NEIL
>
> "Adrian Jones" <AdrianJo...@discussions.microsoft.com> wrote in message
>
> news:FF22E277-54AE-4477-983A-(E-Mail Removed)...
>
>
>
> > Hi,

>
> > I need to regularly check an FTP folder for the presence of a file, and if
> > found, run a routine.

>
> > Given that this is all on our ISP's servers, what is the best way to
> > automate such a routine in ASP.NET?

>
> > The end target of the routine is likely to be a MySQL database. If we were
> > using SQL Server, I assume I could use DTS to trigger the process, but I'm
> > fairly ignorant of MySQL.

>
> > Thanks!- Hide quoted text -

>
> - Show quoted text -


As I understand it, there is no need for any FTP actions. ASP.NET
needs to check if the file is in the local directory and if the file
is there, open it and import to the database. I'm right? So, if the
source file is small I don't see any problem to implement such
function - schedule aspx, depends on input format open the file and
make a connection to MySQL, import your data. That's all :-)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
automating data =?Utf-8?B?SSBoYXZlIG5vIGlkZWE=?= Microsoft Access VBA Modules 1 29th Jan 2007 12:14 PM
Automating data entry mrdata Microsoft Excel Discussion 16 26th Jul 2006 02:33 AM
Automating Data Analasys Thansal Microsoft Excel New Users 2 30th Jun 2006 02:36 AM
automating get external data (from web) _Bigred Microsoft Excel Worksheet Functions 0 12th Jun 2005 10:25 PM
Automating data load. Dinesh Microsoft Access 1 25th Sep 2003 09:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:41 PM.