• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Updating a remote database which sits on a secure windows 2000 server

Hi

I have a website that reside on a multi domain server provided by my ISP. I have developed a program that browses for images on local disk, you also fill in a few details and it uploads (FTP) the images, the data (what you've filled in your text boxes, the value of checkboxes, etc......) onto the server. No problem so far. Now along with the images and data, I also upload a text file that contains a SQL statement (INSERT INTO tblName .........).

To actually enter my data into the MS Access database which sits on the server, I need to execute the SQL statement. So using FilesystemObject I scan all my folders for the existance of this text file. Once I find any, I run it and providing the INSERT is successful, I delete the text file that contains the SQL statement. The whole thing does work, but something tells me this is not very elegant. Do any of you out there have a more clever way of updating a remote Access database? Please remember that I eventually intend to distribute this program and it will be up to a 200 users uploading their data onto the server. I also have to note that my ISP doesn't actually allow any settings, registry of the server to be changed, so I may have no choice but to go for a dedicated server.
I'd appreciate your inputs
Thanks - Med
0
uncle_med
Asked:
uncle_med
  • 5
  • 4
  • 2
1 Solution
 
rohanbairat3Commented:
You can write an ASP or .net routine to update the remote database ...

if you want i can paste some asp code for u ...

-rons
0
 
Julian HansenCommented:
How much data are we talking about?
0
 
uncle_medAuthor Commented:
Hi Rohan
I already have asp script that can insert into the DB, the problem is that it sits on the server and makes the process 2 stages, 1-upload by client, 2-Insert into db. I was wondering if there is a simple way in which the VB program itself could update the DB without having to run a script on the server.
Med
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
uncle_medAuthor Commented:
Maximum of 100Kb at a time (each upload).
0
 
rohanbairat3Commented:
U can update data on remote server by using ADO drivers

eg.

   objConn.Open("Driver=SQL Server;Server=192.33.22.122;UID=sa;PWD=pass;Database=ROHAN")

The above is an example for connecting to SQL Server


you can specify the IP add of the remote server instead and change the username and password settings...

You can also write a VB program for the same ...and put it in a scheduler ...

-rons
0
 
Julian HansenCommented:
Why not have the VB App call a webservice - write the update routine as a web service and call it directly from VB - you won't be able to update the database directly - unless it is on a drive that is visible to the outside world which I seriously doubt - so you would need to go through an intermediary.

What you could do is upload the text file and then call either an asp page with posted data containing the location of the uploaded file or use something like SOAP to access a Web Service.
0
 
Julian HansenCommented:
Except the data is in an Access database which means you need access to the file system and since the title of this post is

"Updating a  ... on a secure windows 2000 server"

I doubt that accessto the underlying file system would be permitted.
0
 
uncle_medAuthor Commented:
webservice as in asp.net? or a routine in regular asp? To be honest I don't know .net very well, I've just done a little bit of reading on it. From what i've seen asp.net is quite easy to learn....

Its an interesting idea Julian and I could certainly do it calling an asp page which could invoke an update function, the only obvious problem is that the call to the asp page will be recorded in IE history wouldn't it? So potentially the users can repeat the call directly through IE address bar.....
0
 
Julian HansenCommented:
A web service is just some server side process that offers some web based service to remote applications. There is a lot of support for Web Services in .Net but you don't have to use .Net - you can simply call a .ASP page with posted parameters to achieve the same effect.

>> Its an interesting idea Julian and I could certainly do it calling an asp page which could invoke an update function, the only obvious problem is that the call to the >> asp page will be recorded in IE history wouldn't it?

The way I understand it you are uploading to the site from a VB App - this has no interaction with the browser and therefore will not end up in its history.

If this is the case then you could do something like this

VB App

Uploads files (including script file)
VB App makes HTTP call to ASP page with script file location as a parameter
VB App continues and exits or waits for status code from ASP script - depends on your requirements.

ASP Script takes parameter opens file and executes query. Deletes file

The only tricky bit would be the http connect from VB - in my apps I use the WININET functions but I suspect there are easier ways in VB to do it - through a control or such.

Even if someone can find the ASP url executed all they would be able to get from that would be the filename of the script and as the ASP script deletes this each time it is of no use to them. From the VB side you could create a random filename each time so that each filename is used only once.

That's a broad outline - let me know if I misunderstood anything.

Julian
0
 
uncle_medAuthor Commented:
You're right ................ if I don't use the web browser then there shouldn't be any references to the visited file in history I think!
I think your approach is interesting and it will work, however is there any particular reason you would want to upload the script file? Wouldn't it be better for the script to sit on the server and just run it by calling it from the app with relevent parameters?
0
 
Julian HansenCommented:
Yes certainly - there are many ways to skin this cat - I was not 100% sure I understood your exact environment - there may have been a reason you needed to modify the script file (i.e. it was dynamic) - but if this is not the case then a parameterised script would work just as well and is probably the better solution.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now