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 > Binary File Streaming w/ASP Problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-04, 10:34
julygis julygis is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Unhappy Binary File Streaming w/ASP Problem

Hi everybody,

I'm using a free component to create a PDF file from an html page and it's working fine but when I try to read it it does not load in some computers.
I'm using ADODB.Stream to read the file and I'm thinking that the component may be disabled in the other computers as it works for me.

Any Ideas?

Here is the code

Code:
  Response.ContentType = "application/pdf"
 
  Const adTypeBinary = 1
  Dim strFilePath
  
  strFilePath = PDFFilename 'This is the path to the file on disk.
  
  Set objStream = Server.CreateObject("ADODB.Stream")
  
  objStream.Open
  objStream.Type = adTypeBinary
  objStream.LoadFromFile strFilePath
  
  Response.BinaryWrite objStream.Read
  
  objStream.Close
  Set objStream = Nothing
How can I know if the object was created in this line?
Code:
  Set objStream = Server.CreateObject("ADODB.Stream")
Thanks,

Juliana

Last edited by julygis; 12-15-04 at 11:13.
Reply With Quote
  #2 (permalink)  
Old 12-19-04, 20:02
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Unless you have OnError Resume Next you will get an error message if the creation fails.

This is all server side code though right? So it's not going to be a problem with the component.....

Have you checked to ensure that all the machines have Acrobat on them?

Rather then using the ADODB stream why not use the FileSystemObject stream??
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