How to upload data to a webserver and read into database

SBSP

Senior Member
Joined
Sep 7, 2007
Messages
667
Reaction score
16
Hi What would be the best way to load a database from a remote computer.
My options are FTP and HTTP and possibly SFTP with WinSCP or something similar.

I have a web front end which i have created using ASP.


The webfront end is on site B

It connects to a database on the server side then runs a few SQL queries and shows
sales information in different ways.
Sales by customer by category, Sales by Transaction history ect ect
The database fields have this.
[Unique Company code],[Customer Code],[Customer Desc],[QTY_Sold],[Sales_AMT],[INV_NUM],[ORDEr_NUM],[TRAN_Date] and a few others.

The above part works perfectly.

Site A
I then have a stored proc which extract data from a ERP system which has the above fields in excel can make it CSV aswell.

it basically only extracts the information needed for the above sql reports to run on the webfront end on Site A
The problem is i want this to be automated.

What would be the best way to get the data from Site A to Site B.
I can upload the data file from a to b via FTP or SFTP but how would i notifiy SiteB that the data upload is done and it must import the file ?

Site b is a normal hosting provider and does not belong to me and does not have a "CRON" type scheduler.
Also even if i add a scheduler service i dont want siteB to upload files whils they are being in use by the upload process from Site A.

Dont need code just the idea :)
 
Hehe! Google returns World cat federation :D

Windows Communication Foundation ?
Complicated something a bit easier to use please :-)
 
Create 2 files. 1 file is your data file, the 2nd file has the same filename as file 1, except it is an empty file with a different file extension, say .FIN This file is created when the 1st file is complete.

The site only processes files which have .FIN companion files. That way it won't read the 1st file while it is being created. Be sure to rename the 1st file and delete its .FIN companion once done to avoid processing twice.

Edit: can't see this working without a scheduler on site B
 
Last edited:
Hehe! Google returns World cat federation :D

Windows Communication Foundation ?
Complicated something a bit easier to use please :-)

you could always settle for a normal (or goold old fashioned) webservice ;), that would be quick and easy to set up. How big is the file/data that you want to get up?

are both apps using asp.net? which framework?
 
Nope classic asp.

sjoe, thats scary :D.

What we have done before (years ago), is to ftp the file across and whenever someone accesses a page on the website we would run a function to check if the file was imported or not and take the appropriate action. However there are issues with that approach. First of all it relies on someone to actually go to the site, so not reliable if the data needs to be correct at all times. Also the first person hitting the import function could wait long time while the data is being imported. Not knowing your situation, I would recommend upgrading to .net, there are newer functionality in there (including WCF) that would be far better solution for what you want to do here.
 
LOL yes, Ive been doing VB6 for years and its all i know well. I dont really have time to sit and learn VB.net.

the files i'm uploading will be no more than 200Kb at a time.
I was thinking of creating a vB6 program which is making use of the Winsock OCX
Which connects to the web site to log in then upload data then refresh a page which will use ASP to upload the data into a database
that way i dont need scheduling on the server or worry about a file which is not imported.
For multiple profiles i can separate the process by doing it in different folders on the server.

i have another post here which is not related to this where i'm trying to get proper authentication but i'm not winning with Classic ASP.

So yea maybe you are right, i should just start using ASP.NET

I must say i hate .net stuff it feels like everything related to it is so slow.
installing frameworks is slow, the Visual studio IDE is slow everything is SLOW!
 
I must say i hate .net stuff it feels like everything related to it is so slow.
installing frameworks is slow, the Visual studio IDE is slow everything is SLOW!

lol... just looking for excuses!! its not slow, if it is slow you know you did something wrong somewhere. Things are way easier to do in .net. With classic asp we had to do a lot of plumbing to get stuff to work, but with .net its definitely made our work easier. Definitely not looking back to classic asp.
 
Ok so last night i installed Visual Studio 2010, LOL its actually cool, i just need to get my head around the interface.
You can just drag and drop buttons text boxes divs ect ect onto it, double click it and add vb code
 
Ok so last night i installed Visual Studio 2010, LOL its actually cool, i just need to get my head around the interface.
You can just drag and drop buttons text boxes divs ect ect onto it, double click it and add vb code

YAY!

:D though I am still sometimes coding by hand instead of dragging and dropping. You don't always need all the default properties that gets created in the designer for you.
 
Top
Sign up to the MyBroadband newsletter
X