I am involved with government healthcare facilities and have 40 small healthcare facilities in remotes villages that i supervise, here in rural South Africa.
The people are quite computer illiterate and i need to simplify/automate the data transfer process instead of using external drives etc. We have a virtually zero budget for fancy applications, and that's why i use Access.
My plan/problem is:
I would create a backup/zip file on the local machines by the press of a button, manually connect with the internet via 3G, and then ftp one file to a location on a server once a week. The files will then be manually imported into the main application DB on the server by my staff.
This process will then be rolled out to many other rural areas if i can get it to work.
Can this ftp transfer be done via Access 2007 runtime version on their local machines?
Any suggestions? please help.
For anybody else wanting to do this:
I got this code on the net and it works 100% after adapting some of the code as shown below, for access 2007. I also imported the module files into my application, from the zip file on the site. -
'This code was originally written by Dev Ashish
-
'It is not to be altered or distributed,
-
'except as part of an application.
-
'You are free to use it in any application,
-
'provided the copyright notice is left unchanged.
-
'
-
'Code Courtesy of
-
'Dev Ashish
-
-
Private Sub TestFTPUpload_Click()
-
On Error GoTo ErrHandler
-
-
Dim objFTP As FTP
-
Const conTARGET = "ftp://196.xx.xx.xx/directory"
-
-
Set objFTP = New FTP
-
With objFTP
-
.FtpURL = conTARGET
-
.SourceFile = vbNullString
-
.DestinationFile = "/directory/test.txt"
-
.AutoCreateRemoteDir = False
-
If Not .IsConnected Then .DialDefaultNumber
-
.ConnectToFTPHost "username", "password"
-
.UploadFileToFTPServer
-
End With
-
ExitHere:
-
On Error Resume Next
-
Set objFTP = Nothing
-
Call SysCmd(acSysCmdRemoveMeter)
-
Exit Sub
-
ErrHandler:
-
MsgBox Err.Number & vbCrLf & Err.Description, _
-
vbCritical + vbOKOnly, Err.Source
-
Resume ExitHere
-
-
End Sub
** Edit **
More on this can be found at Modules: Internet Data Transfer Library.
The actual download file (only) can be got from here (FTP prg.zip).
14 3402 NeoPa 32,556
Expert Mod 16PB
It can be done, but it's not straightforward.
If you can provide me decent chapter and verse info then I can help, but the normal level of communication on here where every item of info needs to be pulled like teeth will make helping just too complicated.
Do you think you're up for that? It may take some time putting all the technical info together too, so be warned it's not likely to be a quick fix.
thx for feedback. i was just trying to establish the possibility first. When i am ready i will post the info.
NeoPa 32,556
Expert Mod 16PB
Sounds good.
I may need to get an article sorted out on it all, but that'll obviously depend on time. Articles do take a bit extra for sure.
I will appreciate any information on this "challenge", to see what changes are required in my application
regards
Neels
For anybody else wanting to do this:
I got this code on the net and it works 100% after adapting some of the code as shown below, for access 2007. I also imported the module files into my application, from the zip file on the site. -
'This code was originally written by Dev Ashish
-
'It is not to be altered or distributed,
-
'except as part of an application.
-
'You are free to use it in any application,
-
'provided the copyright notice is left unchanged.
-
'
-
'Code Courtesy of
-
'Dev Ashish
-
-
Private Sub TestFTPUpload_Click()
-
On Error GoTo ErrHandler
-
-
Dim objFTP As FTP
-
Const conTARGET = "ftp://196.xx.xx.xx/directory"
-
-
Set objFTP = New FTP
-
With objFTP
-
.FtpURL = conTARGET
-
.SourceFile = vbNullString
-
.DestinationFile = "/directory/test.txt"
-
.AutoCreateRemoteDir = False
-
If Not .IsConnected Then .DialDefaultNumber
-
.ConnectToFTPHost "username", "password"
-
.UploadFileToFTPServer
-
End With
-
ExitHere:
-
On Error Resume Next
-
Set objFTP = Nothing
-
Call SysCmd(acSysCmdRemoveMeter)
-
Exit Sub
-
ErrHandler:
-
MsgBox Err.Number & vbCrLf & Err.Description, _
-
vbCritical + vbOKOnly, Err.Source
-
Resume ExitHere
-
-
End Sub
** Edit **
More on this can be found at Modules: Internet Data Transfer Library.
The actual download file (only) can be got from here (FTP prg.zip).
NeoPa 32,556
Expert Mod 16PB
I was very interested to see this Neels. I should say it's a completely different approach to the one I've used.
I looked into the code but noticed early on that I had nothing defined for the FTP class that you use in line #13. Is there a library reference that we should know about setting up?
I also imported the following modules into my application, to make the ftp functional.
(One of the modules is for http)
Perhaps this will make more sense to you now
NeoPa 32,556
Expert Mod 16PB
In this case, that is a link that is perfectly acceptable to post, so I will add it to your Best Answer post. That way anyone seeing that will have access to the full solution. The code, as your post includes reference to, is provided by Dev Ashish, an Access MVP.
PS. Sorry - I missed your latest post with it in. I will still update the Best Answer post to make it easier for others who come across this thread to find the solution.
My next challenge would probably be set my pc up with dyndns etc, to use as a ftp server. Any suggestions?
NeoPa 32,556
Expert Mod 16PB
I can suggest that you post this question in the Windows forum.
If you like you can post a link in here to the new question too, though I'm afraid I will not be able to help a great deal there, and I don't want to discourage anyone else from getting involved by posting anything in there.
I would say though, that hosting any sort of internet server service on home machines is not generally considered a great idea. It's not always a bad idea necessarily, but there are many reasons why it is more complicated than hiring a server presence set up specifically for the purpose. Principal among these is the upload rate of your link (The A of ADSL stands for Asymetric and means that the upload rate is generally much less than the download rate), and the complication of DNS directing anyone correctly to your machine (Presumably DynDNS has a solution for that assuming it stands for Dynamic DNS). Actually, the last of the three I will mention is probably the hardest for most to deal with, and that's the routing and firewall issues.
The code works fine if i "hard code" the file name to be uploaded in line 20. In line 19 it asks you what file you want to upload and it is then selected from the directory where its kept.
i have changed the code in line 21 to true and false.
I would like the code to take this file as selected in line 19 and then add it to the directory in line 14 without having to specify the name in line 20.
If i use .DestinationFile = "/directory/*.*" in line 20, then it use *.* as the name of the file transferred.
please help
NeoPa 32,556
Expert Mod 16PB
I don't follow. Lines #19 and #20 are as below : - .SourceFile = vbNullString
-
.DestinationFile = "/directory/test.txt"
What you say about them makes little sense. If you're talking about code that's different from what's posted then please show what it is you're talking about. My psychic senses aren't that reliable.
To save wasting time completely, I would comment that your line #20 uses forward slashes (/) instead of back slashes (\) which are required for Windows filenames, and that no drive letter is included. What you want to work with in relation to someone choosing a file or folder though, is entirely unclear to me (as you've given me nothing to work with).
This is my problem - .DestinationFile = "/directory/filename.txt"
i have to specify this line in the code what the file i am uploading, is called. If i upload a different file, then i must change the description above again.
The code does give you the option to select a file , but then this files name must be named exactly as above
I would prefer to have had something like *.* there, so that i can select the file i want to upload myself and don't have to "hardcode" its name in the above code everytime.
i think this code (line 19) - .SourceFile = vbNullString
gives you the option to select the file to be uploaded
It works great except for these limitations.
any suggestions please?
NeoPa 32,556
Expert Mod 16PB
I'll look at this again when it's not so late in the evening. I really have to think about what you are trying to say as it's so short of simple, logical statements, but seems to assume I know what you're trying to say already. I don't, and my tired brain is complaining when I try to read through your post again. I'll see what sense I can make of it tomorrow.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Philip Lee |
last post by:
Dear all,
How can I access files in remote file server through my ASP.NET application
only, but deny all other users? I have added
<identity impersonate="true"
userName="test"...
|
by: Ronald S. Cook |
last post by:
In my .aspx page, I am trying to read file that is on a different on the
company network.
When I map a drive to it and call from within my .aspx page, I get this
error:
|
by: Stanley Sin |
last post by:
Dear all ,
How can I remote access SQL server 2000 using vb.net? I don't
know how to use ADO.net to remote access database . Any solutions?
Thanks in advance.
Stanley
|
by: Marc Castrechini |
last post by:
This is a classic double hop delegation issue, however its the first time we
are setting this up so we are doing something incorrectly. If we run
through the IDE or using a localhost path on the...
|
by: olekribu |
last post by:
Hi!
I'm struggling with the following scenario:
I want my asp.net application to be able to create and write to a specific file on a remote file server from a web server. Both servers have...
|
by: AtulTiwari |
last post by:
I know that I AM HERE again for this discussion but what can i do? I am very much frustrated that i can't be able to send or post the file to remote server.
So can any one Explain me that how can...
|
by: Kurt Jakobsen |
last post by:
Hello,
I have a client program that I use to access a MySql 5.0 community server. The client can be on the machine where the MySql server is installed or from a remote machine.
The client has...
|
by: josephlee |
last post by:
Can an Access application running on Terminal Server be accessed by
logging in to a remote desktop via a web browser the same as an Access
app running on Citrix can be or is it different to that?
...
|
by: |
last post by:
Hi all,
I have an asp.net 2.0 website that accesses a locally hosted web service.
This works fine on servers that are connected to our network. However, I am
having a problem with a laptop...
|
by: tanvisethi |
last post by:
Hi I have an asp.net web application. I am trying to access files from remote server (on local network) and unfortunately it isn’t working out. Problem is I am not sure if the error is cos the path...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |