reading values in a text stream

Results 1 to 2 of 2

Thread: reading values in a text stream

  1. #1
    ASP Doofus Guest

    Default reading values in a text stream

    I&#039;m trying to create a permissions check in a flat file on my web server that looks like this: <BR> joe,1 <BR> bob,1 <BR> sue,3 <BR> amy,2 etc. <BR><BR>When a user logs on, their ID (eg--Sue) will be checked against this file to make sure they really exist, and then different permissions will be assigned based on the number after the comma. I think I understand how to create the FSO and text stream, but I&#039;m struggling with the logic of &#039;reading&#039; the value after the comma. I&#039;d greatly appreciate any help anyone can provide. <BR><BR>Here&#039;s what I have so far: <BR> set fso = Server.Createobject("Scripting.FileSystemObject") <BR> path - "E:...permissions.txt" <BR> set file = fso.GetFile(path) <BR> set ts = file.OpenAsTextStream(1,-2) <BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: reading values in a text stream

    yourvar = Mid(str1, InStr(str1, ",") + 1)<BR><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