If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > is it possible to have a .pdf recordset?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-04, 06:53
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
Hi spudhead, thanks for the reply, and for clearing that up.

To be honest i dont mind if they see it. But from your first answer I'm reading it to mean, and i could be wrong here, that id have to hardcode all pdfs with links into my code? is that correct?

I'm curious how the second answer would be acieve, cuz you're right it does sound complex, bear in mind i have only been coding for 3 months now. Also, is there a right way or wrong way?

any info would be appreciated

Regards
MG
Reply With Quote
  #2 (permalink)  
Old 08-25-09, 07:46
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
is it possible to have a .pdf recordset?

Hi all,

I'm new to this world so please forgive me if this is a silly question.

I was wondering if it was possible to have a recordset of pdf files that can be displayed to a user in the form of a drop down menu, using ASP / stored procedures etc. When a user selects a specific file they want tio view they can then select it and load it in a new window?

I think, guess, that it is, but dont know where to start? Perhaps create the table populate with some test data. Write some code in the ASP page. Use STore procedure to populate the drop down menu....and then im stuck.

Any help pointers, examples etc will be great

Kind regards
MG
Reply With Quote
  #3 (permalink)  
Old 08-25-09, 09:16
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
To get started, you may want to explore where your pdf's are going to be stored. If you choose to store them on disk, it simply becomes a matter of keeping track of where all your pdf's are and using ASP to direct the user to the correct pdf based on a menu selection (which will be passed as a form variable on post).
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #4 (permalink)  
Old 08-25-09, 10:16
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
Hi , thanks for your reply.

Well, at the moment im working on my local host, just to see if it all works. But when all appears ok, it will be transferred over to a server dedicated to this project.

I know I can get these pdf to appear in my drop down menu, but once selected? When they have been selected by the user, I guess I can have an "onchange submit" function? is that right?

Regards
Mg
Reply With Quote
  #5 (permalink)  
Old 08-26-09, 10:12
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
Hey all, just checking back.

I have been reading about FSO, and im thinking I need to look at in particular at ASP OpenTextFile? is that right?

I shall follow this white rabbit, hope im on the right tracks. If not please say.

Thanks all.

Regards
MG
Reply With Quote
  #6 (permalink)  
Old 08-26-09, 11:12
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
No need. Unless you're trying to hide your PDF's from being "linkable". You can keep a database that stores where all your pdf's live and use ASP to resolve a "pdf_id" to a path, then squirt that in to a page.
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #7 (permalink)  
Old 08-26-09, 11:21
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
Hi teddy, thanks for the reply.

How would i do that?

So far i have, a table with the names of the pdfs. and I also have the location of the pdf in the table, altho' i dont think thats entirely correct.

I have also created a drop down menu for these pdfs and they can be viewed.

Here is ASP:

Code:
SELECT PDF LISTINGS <select onchange="window.open(this.value, '_blank');" name="zoneID" id="Select2">
               <option value="0" > - Display Types - </option>
                    <%
                    sSQL = "exec spGetDisplayTypes"
                    SET oRS = oDB.Execute(sSQL) 
                    If Not oRS.EOF Then
                        While Not oRS.EOF
                            %>
                            <option value=""><%=oRS("displayTypesName")%></option>
                             <%    
                            oRS.MoveNext
                        Wend
                    End If
                    %>
But how do i get them to link to each pdf. I think this i the second bit of your reply, the pdf_id, but dont know how i would begin to do that?

regards
MG
Reply With Quote
  #8 (permalink)  
Old 08-27-09, 08:02
Spudhead Spudhead is offline
Registered User
 
Join Date: Jan 2002
Posts: 189
I think what Teddy is talking about is if you don't want your users to be able to see where the PDF files are actually located on your server.

If you don't mind them seeing the correct URL to the PDF in their browser address bar, then just put the location of the PDF into the "value" field of each <option> tag, and your code above should open it up.

If you do mind, then you'll need to link to a 'download' ASP page that accepts the PDF ID, looks up the filename from the database, uses an ADODB.Stream to read its contents, and then uses Response.BinaryWrite to pump the stream contents back down to the browser as ContentType "application/pdf". It's not as complicated as it sounds, though
Reply With Quote
  #9 (permalink)  
Old 08-27-09, 10:39
mind_grapes mind_grapes is offline
Registered User
 
Join Date: Jun 2009
Location: Midlands
Posts: 133
Hi spudhead, thanks for the reply, and for clearing that up.

To be honest i dont mind if they see it. But from your first answer I'm reading it to mean, and i could be wrong here, that id have to hardcode all pdfs with links into my code? is that correct?

I'm curious how the second answer would be acieve, cuz you're right it does sound complex, bear in mind i have only been coding for 3 months now. Also, is there a right way or wrong way?

any info would be appreciated

Regards
MG
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On