Problems with FilesystemObject

Results 1 to 2 of 2

Thread: Problems with FilesystemObject

  1. #1
    Join Date
    Dec 1969
    Posts
    78

    Default Problems with FilesystemObject

    I&#039m using the following code to give me a textstream called strLine. The problem is that I want to manipulate this string, in particular to use visual basic commands like "instr" and "left" to pull it apart and then store part of it in a database. I can put the whole string in a db, but when I try to manipulate it, as I said above, and put that in the database, I just get nonsense. Is there something obvious I need to put in these command lines to allow me to manipulate the string? Thanks for any help.<BR><BR>Set objFSO=Server.CreateObject("Scripting.FileSystemOb ject")<BR>Set objFile=objFSO.GetFile(CurrentFile)<BR>Set objFileTextStream=objFile.OpenAsTextStream(ForRead ing, TristateUseDefault)<BR><BR>strLine=Server.HTMLEnco de(objFileTextStream.Readall)

  2. #2
    Volker Guest

    Default RE: Problems with FilesystemObject

    Yes, why are you using HTMLEncode just to put your string into a database? HTMLEncode converts a string into a format, so that you can use this String in a URL (for example mySite.com/myPage.asp?name=John+Doe), the "+" comes from the HTMLEncode function when you call HTMLEncode("John Doe") . <BR>I guess, you just need to get rid of that Server.HTMLEncode and your code will be working fine!<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
  •