October 30th, 2000, 03:26 PM
I'm trying to write a simple guestbook in ASP (Please don't tell me that I should switch to another language, as I can't.). The following code is what I have so far.
'### Write the results to file
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, 8, True)
objFile.Write "</p><p align='right'>"
objFile.Write ", <a href='mailto:" & Server.HTMLEncode(Request.Form("email")) & "'>"
objFile.Write Server.HTMLEncode(Request.Form("email")) & "</a></font><br><font size='1'>"
objFile.Write now & " - ip address:"
objFile.Write (request.servervariables("remote_Addr")) & "</font></p>"
Set objFSO = Nothing
Set objFile = Nothing
I keep getting a Server.CreateObject error, on this line: Set objFile = objFSO.OpenTextFile(strFile, 8, True). I have no clue why that doesn't work.
October 30th, 2000, 03:28 PM
I forgot. All the other variables in there are defined and work. I made sure of that. The error is somewhere around the create object part. If anyone can solve my problem, I greatly appreciate it!
November 1st, 2000, 10:36 PM
I dont know why you are using a text file for a database...i recommend using access. Its easier to query data and display it. I would rewrite the script for a access database. If you need anyhelp with asp or access email me at email@example.com