Results 1 to 2 of 2

Thread: FileSystemObject

  1. #1
    Join Date
    Dec 1969

    Default FileSystemObject

    I have to create a contract and save the whole thing. I create this contract using asp and html. I take data from a DB to populate the page. Once everything is created the user can print this contract. I need to save this contract as an html file and save the path to the DB. I am using the FileSystemObject. My permissions are set but for some reason I can not find the saved file on my hard drive. I am not getting any error so I don&#039t know what is wrong. This is just one of the many things that I have tried. Does anyone see where I went wrong?<BR><BR>Const fsoForWriting = 2<BR><BR> Dim objFSO<BR> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR><BR> &#039Open the text file<BR> Dim objTextStream<BR> Set objTextStream = objFSO.CreateTextFile("C:SomeFile.txt", fsoForWriting, True)<BR><BR> &#039Display the contents of the text file<BR> objTextStream.WriteLine "Hello, World!"<BR><BR> &#039Close the file and clean up<BR> objTextStream.Close<BR> Set objTextStream = Nothing<BR> Set objFSO = Nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: FileSystemObject

    I Tried It On My Computer And It Worked. I Don&#039t See Any Problem. But A Second Opinion. <BR><BR>Matt

Posting Permissions

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