Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject - TextStream object

Status
Not open for further replies.

NeedHelpProgrammer

Programmer
Feb 17, 2004
9
US
Here is my code:

Set objFile = Server.CreateObject("Scripting.FileSystemObject")
Set objStream = objFile.OpenTextFile("employees.dat", ForAppending, TRUE, TriStateUseDefault)

objStream.WriteLine(Name & vbTab & Dept & vbTab & Home_Phone & vbTab & Extension)

objStream.Close

--------------------------------
It does not create an "employees.dat" file.
I've even changed the ForAppending to ForWriting. It still does not create the "employees.dat" file. My adovbs.inc has the ForAppending and ForWriting values included under the FileSystemObject Values section. So, I'm covered there. All the variables listed in the WriteLine statement have been defined and a confirmation page lists the inputted data.

Any ideas?

 
You should specify the full path to the file like: "C:\employees.dat". I bet the file does get created in the working folder to the IUSR_XXX account.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top