|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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 Dim objFSO Dim objFile Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(strFile, 8, True) objFile.Write (LineAttribute) objFile.Write (TextAttribute) objFile.Write Server.HTMLEncode(Request.Form("comment")) objFile.Write "</p><p align='right'>" objFile.Write Server.HTMLEncode(Request.Form("name")) 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>" objFile.Close 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. |
|
#2
|
|||
|
|||
|
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!
|
|
#3
|
|||
|
|||
|
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 frank_17@hotmail.com
|
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > ASP Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|