Hi, I am fooling around learning some ASP and the current page i have made reads a certain word from a .txt file i provide. Here is some code i got off a tutorial webpage and i just have a few questions about it
Set fsObject = Server.CreateObject _("Scripting.FileSystemObject"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set tsObject = fsObject.OpenTextFile(XXX,1,1)
tsObject.SkipLine 'Just skip to the relevant line
tsObject.Skip(10) 'Skip to the relevant spot on the line
Do While Not tsObject.AtEndOfLine
name = name & tsObject.Read(1)
Loop
Set tsObject = nothing
Okay, first i want to know if the text file that i opened will get closed by default or if i need to write some code to close it explicitly. If i need to write some code please tell me the method that i need to use.
Also, do i also need to say 'Set fsObject = nothing'?
And lastly, exactly what does that do to say that
Set tsObject = nothing. I am familiar with C/C++ so if you could perhaps relate it to that it might help. Or if the answer is straight forward please explain what it means or does.
sorry for the long post,
but thanks in advance for any answers.
Set fsObject = Server.CreateObject _("Scripting.FileSystemObject"
Set tsObject = fsObject.OpenTextFile(XXX,1,1)
tsObject.SkipLine 'Just skip to the relevant line
tsObject.Skip(10) 'Skip to the relevant spot on the line
Do While Not tsObject.AtEndOfLine
name = name & tsObject.Read(1)
Loop
Set tsObject = nothing
Okay, first i want to know if the text file that i opened will get closed by default or if i need to write some code to close it explicitly. If i need to write some code please tell me the method that i need to use.
Also, do i also need to say 'Set fsObject = nothing'?
And lastly, exactly what does that do to say that
Set tsObject = nothing. I am familiar with C/C++ so if you could perhaps relate it to that it might help. Or if the answer is straight forward please explain what it means or does.
sorry for the long post,
but thanks in advance for any answers.