Issues with 'OpenAsTextStream' when trying to read/write to a file....
Posted on 2006-06-24
I have the following code at the start of an ASP file.....
'Create a File System Object variable
Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")
'Create the path to the count file, and store as string
sFilenameCountPath = Server.MapPath("custData\count.txt")
'Initialise a File Object with the path and name of count text file to open
Set filObjectCount = fsoObject.OpenTextFile(sFilenameCountPath, 8, TRUE)
'Open the count text file
** Set tsObjectCount = filObjectCount.OpenAsTextStream
...........then some processing form data and directing to a thankyou page..................
When running the ASP, I am getting the following error at the line marked with an asterix.....
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'OpenAsTextStream'
Any suggestions as to what I am doing wrong? I've read around and what I have looks pretty standard...