Text file overwritten with x_M@“*

Results 1 to 2 of 2

Thread: Text file overwritten with x_M@“*

  1. #1
    Join Date
    Dec 1969

    Default Text file overwritten with x_M@“*

    I&#039;m using a text file to store a list separated by commas, loading it as a text stream, splitting it into an array, and doing a bubble sort, then resaving the joined array, using the following code. It worked fine for some time, but now it seems to be overwriting the first few characters of the text file with what looks like gibberish to me - it actually overwrites with this : ÈM@ÈM@ or x_M@“*<BR>It appears that the overwriting is happening while saveing the file, because the joined array before saving is unharmed, and is only harmed when the file is loaded again as a textstream.<BR><BR>What is going on ?<BR>The following code is only the part that is saving the file.<BR>Please help.<BR><BR><BR>savedata= join(q, ",")<BR><BR>Set fso = Server.CreateObject("Scripting.FileSystemObject")< BR><BR>set file = fso.CreateTextFile(server.mappath("popular.dat"), true)<BR><BR><BR><BR>file.write savedata

  2. #2
    Join Date
    Dec 1969

    Default Look here...


Posting Permissions

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