royjacob
Nov 4th, 2000, 09:58 PM
I have made this guestbook using as an ASP file using VBScript. Basically what it does is get form values, append it into a text file and filnnaly display the textfile. However it is giving me an error. HERE is my code
<%@ Language=VBScript %>
<%Dim strfile
strFile = Server.MapPath("guestbook.txt")
if Request.Form.Count = 0 then
%>
<H3>Sign Our Guestbook:</H3>
<FORM ACTION="guestbook.asp" METHOD="post">
<TABLE>
<TR>
<TD ALIGN="right"><B>Name:</B></TD>
<TD><INPUT TYPE="text" NAME="name" SIZE="15"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"><B>Comment:</B></TD>
<TD><INPUT TYPE="text" NAME="comment" SIZE="35"></INPUT></TD>
</TR>
</TABLE>
<INPUT TYPE="submit" VALUE="Sign Guestbook!"></INPUT>
</FORM>
<BR>
<H3>Today's Comments:</H3>
<!--#INCLUDE FILE="guestbook.txt"-->
<% Else
Dim fso
Dim objFile
Set fso = Server.CreateObject_("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile_(strFile,ForAppending,8,TristateTrue)
objFile.Write Request.Form("name")
objFile.Close
Set objFile = Nothing
Set fso = Nothing
End if
%>
And this is the error message
Server object error 'ASP 0177 : 80070057'
Server.CreateObject Failed
Someone please please help, i have to finish this project in a week.
<%@ Language=VBScript %>
<%Dim strfile
strFile = Server.MapPath("guestbook.txt")
if Request.Form.Count = 0 then
%>
<H3>Sign Our Guestbook:</H3>
<FORM ACTION="guestbook.asp" METHOD="post">
<TABLE>
<TR>
<TD ALIGN="right"><B>Name:</B></TD>
<TD><INPUT TYPE="text" NAME="name" SIZE="15"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"><B>Comment:</B></TD>
<TD><INPUT TYPE="text" NAME="comment" SIZE="35"></INPUT></TD>
</TR>
</TABLE>
<INPUT TYPE="submit" VALUE="Sign Guestbook!"></INPUT>
</FORM>
<BR>
<H3>Today's Comments:</H3>
<!--#INCLUDE FILE="guestbook.txt"-->
<% Else
Dim fso
Dim objFile
Set fso = Server.CreateObject_("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile_(strFile,ForAppending,8,TristateTrue)
objFile.Write Request.Form("name")
objFile.Close
Set objFile = Nothing
Set fso = Nothing
End if
%>
And this is the error message
Server object error 'ASP 0177 : 80070057'
Server.CreateObject Failed
Someone please please help, i have to finish this project in a week.