Access, OLE, and WEB View

R

RICK

How can you open an MS Access OLE from a WEB page.

Here is what I have so far. With this code the database is found. The
record is found but the link is incorrect.

<%@ LANGUAGE="VBSCRIPT" %>
<% Response.Buffer = True %>
<!--#INCLUDE FILE="Control_i_.asp" -->
<!--#INCLUDE FILE="Connection.asp" -->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<%
Set rsTemp = server.createobject("adodb.recordset")
conn.aqrytbltest rsTemp
strdocument = rsTemp.fields("test")
%>
<body>
<% response.write strdocument %>
<a href=<%= strdocument %>>abd</a>
</body>
</html>
 
D

David H

What are you trying to accomplish? Does the underlying database contain fully
qualified hyperlinks (eg www.google.com) that you want to place on to the
page? Are you trying to provide a means to open an Access database and have
it immediately display a record?
 
R

RICK

The field contains OLE objects (PDF files). I want hyplerlinks that will
open each PDF file that is stored in the database.
 
D

David H

WOW! A scenario that I actually have no idea whatsoever as to wether or not
its possible, let alone how to pull it off. I'm not frequently stumped.

The problem that I see is that since the pdf resides inside Access, there's
no 'path' per se as in "C:\Documents and Settings\dch3\My Documents\pdf
files\." You might be able to get the file name, however without the path the
file name is just that.

In the ASP page, you're only displaying a representation of what's in the
field as opposed to actually having a access to the actual item. Think if it
as having a picture of a chair and detailed blueprints as opposed to the
chair itself - you know the size of the chair, if it has arms, the color of
the fabric, but not the PHYSICAL chair itself.

I'm thinking that you may have to do something where you copy the pdf files
from the Access database to a temp folder while the connection to the
database is open and then set the hyperlinks to the file in the temp folder.
Which if you go that route, you'll need to build something in whereby the
files that that specific user is trying to view are deleted automatically.

Unless a MVP is lurking around that can provide a more thorough answer.
 
D

David H

All that said, that applies to Classic ASP. If you do something with ASP.NET,
you'll have a lot more possibilites give the power of ASP.NET. I've just
started playing with it a few months back personally.

And now that I thnk about it, if you went with ASP.NET you make the
hyperlink's linkbuttons that automatically copy the pdf to the temp folder
and then open it as opposed to copying all of the pdf's to the temp folder
when the page is created. Since ASP.NET is all server side. You'd still have
to sort out how to actually open the pdf. And damnit if I just didn't realize
that something like this would come in handy for a project that's in the
works.

David H
The ASP.NET Virgin
 
D

David H

I just found this article that discusses viewing a file using an ASP.NET page

http://www.4guysfromrolla.com/articles/120606-1.aspx

You might be able to keep your ASP page as-is and then modify the hyperlinks
to point to ASP.NET page that actually displays the file. The section on
'DISPLAYING THE BINARY CONTENT' will be of primary interest as the first
portion of the page deals with capturing the file initially.

The ASP.NET page seems pretty straight forward if you're not familar with
it, I would guess that it might take a day or two to get it up and running if
you've never worked with ASP.NET.

www.4guysfromrolla.com
www.asp.net
haspalliance.com

Are all good reasources. Also, MS has available Visual Web Developer 2008
Express Edition available as a free download which will go a very, very long
way not just for ASP.NET but also for ASP as well.

David H

Pardon me for rambling, but my personality is such that I have to talk or
type out a problem to work through it. I can't just think about it.
 

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