VB COM question

Results 1 to 5 of 5

Thread: VB COM question

  1. #1
    Will Duty Guest

    Default VB COM question

    How would I access the fileSystemObject within a VB COM object?<BR><BR>I access the regular asp objects (response, request, server, session, etc.) with no problem by instantiating them in onStartPage. However, attempting to then use a VB instance of the asp server object to access the fso doesn&#039t seem to work. I also tried creating an fso directly in VB by referencing "Scripting Runtime" in the project and trying to do a createObject but that didn&#039t work either. I don&#039t want to write files from VB itself because I&#039ve read that that is not recommended in an IIS enviroment. <BR><BR>Anyone have any suggestions? Thanks in advance...

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: VB COM question

    Dim whatever As New Scripting.FileSystemObject<BR><BR>if you just what to write files in VB have you thought of just<BR>intsomething = FreeFile()<BR>Open "the file name with path i think" For Input As intsomething<BR><BR>why not juat use that to open and write into files R&D "FreeFile"

  3. #3
    Steve Cimino Guest

    Default RE: VB COM question

    Find the ProgID in the registry. Then, do a CreateObject(progid). I&#039m not sure if there is an available reference to its library in the References menu.<BR><BR>What is wrong with VB&#039s file I/O in an IIS environment? What have you heard? I do it myself, so I&#039m curious on what could be wrong with doing it that way.<BR><BR>Also, what is "onStartPage"? Do you mean Class_Initialize? You need to set a reference to the MS Active Server Pages library in the references menu. Then you can do<BR><BR>Set myObj = new Response

  4. #4
    wduty Guest

    Default RE: VB COM question

    Actually I figured it out. I already had the reference to the asp objects library but it seemed to ALSO need a reference also to scripting runtime.<BR><BR>As to using VB&#039s file I/O: I read the that commentary somewhere at learnasp.com. It recommended not using certain features that are OK in VB standalones exe&#039s like the file I/O. I believe DAO was also mentioned. I don&#039t think there was much beyond that although I did get the impression they were referring to high hit situations, not whether it would work at all which it obviously does.

  5. #5
    wduty Guest

    Default RE: VB COM question

    I figured it out. Thanks for replying though.

Posting Permissions

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