Permission denied

Hi -

I am new to this, but with the help of the tutorials I am || close to getting it. I am getting the following error when it is writting to the file. It wrote the "hello world" perfectly, just not this one.

Storing this value in a session variable.
Product Page: Processing scripts after a pattern application.
Processing script: "Write KA Data to file"
Product Page: An error occurred while processing the script: Write KA Data to file
Product Page: The error message was: Scripting engine failure
Microsoft VBScript runtime error: 2:0
Permission denied

(scode=0x800a0046 wcode=0x0)

This is my script

' Generate objects to write data to a file.
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
Set objDVDFile = objFSO.OpenTextFile( "kate.txt", 8, True )

' Write out the data to the file.
objDVDFile.Write DataRecord.Get( "PRODUCT_NAME" ) + vbTab
objDVDFile.Write DataRecord.Get( "PRODUCT_DETAIL" ) + vbTab
objDVDFile.Write DataRecord.Get( "PRODUCTID" ) + vbTab
objDVDFile.Write vbCrLf

' Close the file and clean up.
objKATEFile.Close
Set objFSO = Nothing

Any help would be appreciated.

Permission denied

I was having the same problem, but I finally figured out that I was entering the wrong session name. VBscript erros are usually not very discriptive, and sometimes seem to have little to do with the actual error created by bad syntax or typos.

It seems to be working now.

Cheers,
McFly

Permission denied

Hi,

Based on the error message, it looks as though the VBScript engine is unable to open the "kate.txt" file for writing. This is most likely because you have it open in another application that has exclusive access to it. Could this be the case? As an experiment, you might try changing the name of the file to something else (i.e., a completely fresh file) to see if you get the same error.

Hopefully that helps. Feel free to post back, if not.

Kind regards,

Todd Wilson