upload from website to database

P

Paul \(OMAC HX\)

Hi all ,

i am wondering is it possible to upload files or images to an ms access
database from a website.
I am able to make entrys and search database though would like to be able to
store images and files and retreive them as well.

Any help greatly appreciated

Paul
 
D

Douglas J. Steele

To download the HTML of a web page, you can use

Sub SaveWebpage(URL As String)
Dim objWeb As Object
Dim intFile As Integer
Dim strFile As String
Dim strHTML As String

Set objWeb = CreateObject("Microsoft.XMLHTTP")
objWeb.Open "GET", URL, False
objWeb.send
strHTML = objWeb.responseText
strFile = CurrentProject.path & "\Saved.html"
intFile = FreeFile()
Open strFile For Output As #intFile
Print #intFile, strHTML
Close #intFile

End Sub

That would save the HTML as a file named Saved.html in the same folder as
the database.

Alternatively, you can use the URLDownloadToFile API function. Randy Birch
has a sample at
http://vbnet.mvps.org/index.html?code/internet/urldownloadtofile.htm
(Obligatory Warning: Randy's site is aimed at VB programmers. There are many
differences between forms in VB and in Access, which can lead to many of his
examples not porting directly into Access. Looking quickly at this example,
though, it should work fine in Access). If you pass the exact URL to the
image, the API will download the image file.
 
P

Paul \(OMAC HX\)

cheers for your reply,

I think i put that question up wrong, I am trying to set up an upload
function in a FrontPage form and would like it ( files and images ) to go to
the database. And then if possible be retrieved using a search form from my
website,

Cheers

Paul
 
P

Paul \(OMAC HX\)

cheers for your reply,

I think i put that question up wrong, I am trying to set up an upload
function in a FrontPage form and would like it ( files and images ) to go to
the database. And then if possible be retrieved using a search form from my
website,

Cheers

Paul
 
D

Douglas J. Steele

In that case, you'd be better off asking in a newsgroup related to
FrontPage.
 
A

AnandaSim

cheers for your reply,

I think i put that question up wrong, I am trying to set up an upload
function in a FrontPage form and would like it ( files and images ) to go to
the database. And then if possible be retrieved using a search form from my
website,

Cheers

Paul

This is a feature which is 100% server side webpage scripting
knowledge - the use of a database like Access is minor. Also, your
system will run very slowly if you store your files and images into
any database - it will run faster if your your files and images are
stored on the web server's file system and you keep metadata only in
the database.

1. You have to choose what webpage scripting mechanism you want to
you.
2. You have to find books and newsgroups that focus on that choice.

HTH

Ananda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top