Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 18th, 2005, 06:39 AM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to retrieve a web page from access database

I want to know how i can read and post a html page stored in access db using asp. What i mean it reads the html page from access and run it on browser so we can see it . I be happy if some one show me the

select statement for such query .Thanks

Reply With Quote
  #2 (permalink)  
Old May 2nd, 2005, 06:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How is the html stored? as an OLE object? or as a Memo Field?
If it's the latter, it's simply a matter of something along the lines of:
Code:
<%
Dim sConnStr
sConnStr = "Some Connection String Connecting to your DB"
Dim sSQL
sSQL = "SELECT HTMLMemoField FROM Table1 WHERE ID=1"
Dim Rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open sSQL, sConnStr, 3, 1
If Not Rs.EOF Then
  Response.Write Rs(0)
End If
Rs.Close
Set Rs = Nothing
%>
If you want have the data stored as a file, rather than text, then you'd be after something along the lines of this (which I've just copied from a page I use that connects to SQL Server - same basic premise though)
Code:
<%
Dim ID
ID = Request("ID")

Dim RsFile
Set RsFile = Server.CreateObject("ADODB.Recordset")

RsFile.Open "select FileData,ContentType, FileName from tblFile where FileID = " & ID, ConnStr, 2, 4

If Not RsFile.EOF Then
   Response.AddHeader "content-disposition", "attachment; filename=" & RsFile(2)
   Response.BinaryWrite RsFile(0)
End If


RsFile.Close
Set RsFile = Nothing
%>
If you're wanting to do it not with ASP - it's a whole different ballgame, and, well, that's a question for another forum.

Steven

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I access a Web page by Internet Explorer Hoang Excel VBA 7 March 11th, 2008 04:42 AM
If then ... for database records/web page SoC Beginning VB 6 2 September 9th, 2004 02:10 AM
access webcam from within web page bleitner VBScript 0 August 21st, 2004 09:55 AM
Access to Excell via a web page Sach Classic ASP Basics 1 April 7th, 2004 01:57 PM
Can Access accept a Null from an ASP web page? kaytrina Classic ASP Databases 5 March 20th, 2004 07:11 PM



All times are GMT -4. The time now is 03:56 PM.


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