Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2003, 03:57 AM
Authorized User
 
Join Date: Jul 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing a remote web site

I want to access (or download) a text file on my web site which is on a shared web hosting ISP (UNIX).

Anyone any ideas

Thanks in anticipation. Ray

__________________
Cheers Ray
 
Old July 24th, 2003, 08:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've got one idea - it's not a great one - and I'd say it would be a last resort.

You could use a "Web Query" in Excel (Data>Import External Data>New Web Query), and have set the properties of it to "refresh on file open", then link that to your Access DB.

When you need the data, have the file open then close itself first, so that it refreshes.

Like I said, not the best option, and probably a last resort.

Actually - make that a second last resort.

I'd say your last resort could be to shell out to FTP, download the file, which you link to it - such as, a link to "C:\file.txt", and before you have something that needs its data, run some code such as:

Function WriteFTP()
Dim strFTPFile As String, strOutputFile As String
strFTPFile = "C:\FTPCommands.txt"
strOutputFile = "file.txt"
Open strFTPFile For Output As #1
Print #1, "lcd c:\"
Print #1, "open yoursite.com"
Print #1, "username"
Print #1, "password"
Print #1, "cd whateverdirectory"
Print #1, "get " & strOutputFile & " " & strOutputFile
Print #1, "bye"
Close #1

Dim X, OpenForms
OpenForms = DoEvents
X = Shell("ftp.exe -s:C:\FTPCommands.txt", vbHide)
End Function


I'm hoping (for your sake) that someone else has some other ideas.

I am a loud man with a very large hat. This means I am in charge
 
Old July 24th, 2003, 08:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

By the way,
One slightly good thing about doing it through FTP, even though it's relatively "static", is that you can change data, then upload it with a similar function, just using "put" instead of "get"

Steven

I am a loud man with a very large hat. This means I am in charge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Publish Web Site & Copy Web Site angshujit ASP.NET 2.0 Basics 1 June 15th, 2007 09:21 AM
Remote Site Set Up Anne Harrington Dreamweaver (all versions) 1 April 7th, 2005 04:25 PM
Error 7399 when accessing remote db ?! VerdaFolio Access 1 June 2nd, 2004 10:47 AM
remote exchange verification by web site mateenmohd Classic ASP Databases 0 June 4th, 2003 03:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.