![]() |
The Grand Chapter of Washington |
Catalog of
Materials
Welcome to the online library of the Grand Chapter of Washington. Many of the items in the collections are the creations of members of our Grand Chapter. Those have been digitized for your perusal and use in your local chapters. If can not see the entire document, contact the Currant Grand Librarian. Otherwise, simply print one or more copies for your own use.
If you have any programs you have used that you would like to donate; please contact the current Grand Chapter Librarian.
|
|
|
|
Addenda about/For |
|
|
|
|
|
|
<% Dim hits Dim objFSO, objTextFile ' Create the FileSystemObject. ' This object has a number of properties which include Drives, Folders and Files Set objFSO = CreateObject("Scripting.FileSystemObject") ' After declaring what properties we want to use, we then declare the Method such as ' OpenTextFile. Others include movefile,getfilename, getfile, createtextfile,.etc. ' The file that is being opened is called data.txt in a database folder named DataBase Set objTextFile = objFSO.OpenTextFile(server.mappath("DataBase/data.txt")) ' This loop reads each line till the end of the file Do While Not objTextFile.AtEndOfStream 'We then store the number value into a variable called id hits = objTextFile.ReadLine Loop ' Increment that value hits = hits + 1 ' Clean up objTextFile.Close Set objTextFile = Nothing Set objFSO = Nothing 'That is all that needs to be done to open a textfile and read the value which it is storing. 'Now, we have to write that new value of id back to data.txt, overiding the value that was there before. ' Again, create the FileSystemObject and this time we override the existing data.txt by using the Method called CreateTextFile. ' The "true" tells the server to override any existing files with the name data.txt Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile(server.mappath("DataBase/data.txt"), true) ' Write the new value of id and then Clean up objTextFile.WriteLine hits objTextFile.Close Set objTextFile = Nothing Set objFSO = Nothing %> 'Write out the data Number of hits: <%response.write hits%>
This page last updated: April 30, 2008