ADO 2.5 Stream Object LoadFromFile Method

Results 1 to 2 of 2

Thread: ADO 2.5 Stream Object LoadFromFile Method

  1. #1
    Doug McDowell Guest

    Default ADO 2.5 Stream Object LoadFromFile Method

    I have written an ActiveX dll in VB that uses the ADO 2.5 Stream object. The code works great in VB, but when compiled and the dll is called, it bombs.<BR><BR>Dim objStream As New Stream<BR>objStream.Type = adTypeBinary<BR>objStream.Open<BR>objStream.LoadFr omFile "c:clouds.jpg"<BR><BR>The compiled dll generates the error &#039File could not be opened&#039<BR>(This particular section is part of a method for streaming the image back to asp using Response.BinaryWrite)<BR>Any ideas?

  2. #2
    Doug McDowell Guest

    Default RE: ADO 2.5 Stream Object LoadFromFile Method

    I should have added that this was running the dll on the same development machine. I added some debug info to the dll itself and narrowed it down to the LoadFromFile method(ie the line number calling LoadFromFile was the one which generated the error). <BR><BR>Fortunately in my case I didn&#039t see the forest for the trees. The dll was originally going to talk over https to another component, but that changed, so I no longer needed a stream object at all, just doing a copy into a byte array was enough, and much faster anyway.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts