Create Obj Error!! "Server.FileSystemObject"

Results 1 to 2 of 2

Thread: Create Obj Error!! "Server.FileSystemObject"

  1. #1
    Appan Jit Singh Guest

    Default Create Obj Error!! "Server.FileSystemObject"

    hi folks,<BR>i m getting create object error at<BR><BR><BR>read the checkpassword.asp at<BR><BR>login is at<BR><BR>i have just started toying with ASP..this is a sample script i got from a frnd.<BR><BR>this script works fine on my pws...<BR>i just created my act with and got the error regarding Create Obj via the web.<BR><BR>any great will be greatly appreciated.<BR>thx a lot in advance..<BR><BR>bye<BR><BR>a well-wisher<BR>appan<BR>0(:-{)<BR><BR><BR><BR>this script works fine on my pws<BR><BR> any suggestions<BR> my code for create object is<BR> Set PasswordFileObject=Server.CreateObjectJ("Scripting .FileSystemObject")<BR><BR>ps: if you know anyother free asp webhosting plz let me know thx :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Create Obj Error!!

    Your code should look something like this:<BR>&#060;%<BR>&nbsp;&nbsp;&nbsp;dim objFileSys,PasswordFileObject, varLine<BR><BR>&nbsp;&nbsp;&nbsp;Set objFileSys=Server.CreateObject("Scripting.FileSyst emObject")<BR>&nbsp;&nbsp;&nbsp;PasswordFileObject = objFileSys.OpenTextFile ("somefile.txt",ForReading,false,TristateUseDefaul t)<BR>&nbsp;&nbsp;&nbsp;do while Not PasswordFileObject.atEndOfStream<BR>&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp; varLine = PasswordFileObject.ReadLine<BR>&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp; &#039 extraxt passwd and check or whatever<BR>&nbsp;&nbsp;&nbsp;loop<BR>%&#062;<BR>< BR>Note: You need to create a file system obj (fso), then use the fso to open a text file. Then loop though it a line at a time.

Posting Permissions

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