Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Rules - Write to File What do each Const mean?

user109227Jan 19 2010 — edited Jan 19 2010
I have a sub routine in my rules to write to file.

It contains a line that says: Const ForReading = 1, ForWriting = 2, ForAppending = 8

What do each one of these do?

Write?
Read?
Append?

I usually use append but it seemed to be placing duplicate items in the file each time I ran it.

Then I tried the write and it only gave me one record.

Thanks!




Here is the entire sub routine:

Sub WriteToFile(txtStringToWrite,FName)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\Hyperion\Extracts\" & FName, ForAppending, True)
f.WriteLine txtStringToWrite
f.Close
On Error GoTo 0
End Sub 'WriteToFile
This post has been answered by Varun Kaushal on Jan 19 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2010
Added on Jan 19 2010
1 comment
1,294 views