This topic is locked

TXT Files

8/20/2008 9:22:36 AM
ASPRunnerPro General questions
B
Bryan author

Hi there,
Could anyone please provide some Event code that when a record is added, changed or deleted (if this is poosible?), it outputs the fields values to a text file?
Eg
If I have a record with the following info:
ID: 21

Name: John Smith

DOB: 15/04/70

Address: 14 London Road
And change the address from 14 London Road to 25 London Road, i'd like to output to a text file:
21,John Smith,15/04/70,25 London Road
If I delete the above record, the output should be the last values stored.
Any help would be appreciated.
Thanks,

Bryan

B
Bryan author 8/20/2008

Sorted this myself. For those interested:
dim oFs

set oFs = server.createobject("Scripting.FileSystemObject")

dim oTextFile
set oTextFile = oFs.OpenTextFile( "c:\myfile.txt" , 2, True)
oTextFile.Write dict("fieldname")
oTextFile.Close
set oTextFile = nothing

set oFS = nothing
Bryan