|
-
Dec 18th, 2001, 10:36 PM
#1
scripting vs as input
i'm pretty new to vb and am having a bit of trouble reading files.
i am currently using the newer version "Scripting.FileSystemObject"
but am receiving an error when i attempt to open a text file for reading.
here's the code currently:
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(sSQLPath)) Then
Set tso = fso.OpenTextFile(sPath, ForReading, False, TriStateFalse)
and here's my error information:
Error Number: 5
Error Description: Invalid procedure call or argument
the path is valid, so i get into the if block fine, i receive an error at the open line.
when i use the older method, it works fine. since there's more flexibility in the FileSystemObject, i'd prefer to use this. is there something obviously wrong here?
justin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|