Hello
I am getting two error messages with the following script.
They are:
Microsoft JET Database Engine error '80040e21'
Field 'Forum.Email' cannot be a zero-length string.
/guest/gsave.asp, line 65
and:
Microsoft JET Database Engine error '80040e21'
Field 'Forum.Message' cannot be a zero-length string.
/guest/gsave.asp, line 65
For some reason, I don't get the error message with the other two fields (name and subject). Can any kind soul suggest what I am doing wrong?
Many thanks
LaPluma
<%
dim objRS, strSQL
dim strName, strSubject, strMessage, strEmail, strDate, strTime
strSQL = "SELECT * FROM Forum"
set objRS = server.CreateObject("ADODB.RecordSet"
objRS.Open strSQL, objConn,1,2
strName = Request.Form("txtName"
strSubject = Request.Form ("txtSubject"
strMessage = Request.Form ("txtMessage"
strEmail = Request.Form("txtEmail"
strDate = (Date)
strTime = (Time)
strMessage = Replace(strMessage,chr(10),"<BR>"
If strName="" or strSubject="" or strMessage="" or strEmail="" Then
Response.Write "Please click <a href=""" &_
"javascript:history.go(-1)"">here</A> to type in your "
Select Case ""
Case strName Response.Write "Name"
Case strSubject Response.Write "Subject"
Case strMessage Response.Write "Message"
Case Else Response.Write "Email"
End Select
Response.Write "" & vbCrLf
End If
Response.End
objRS.AddNew
objRS("Name"
= strName
objRS("Subject"
= strSubject
objRS("Message"
= strMessage
objRS("Email"
= strEmail
objRS("Date"
= strDate
objRS("Time"
= strTime
objRS.Update
Response.Write "<center>The guestbook has been updated with your message</center>"
Response.Write "<center>Please click <a href='gbook.asp'>here</a> to go back to the guestbook</center>"
%>
I am getting two error messages with the following script.
They are:
Microsoft JET Database Engine error '80040e21'
Field 'Forum.Email' cannot be a zero-length string.
/guest/gsave.asp, line 65
and:
Microsoft JET Database Engine error '80040e21'
Field 'Forum.Message' cannot be a zero-length string.
/guest/gsave.asp, line 65
For some reason, I don't get the error message with the other two fields (name and subject). Can any kind soul suggest what I am doing wrong?
Many thanks
LaPluma
<%
dim objRS, strSQL
dim strName, strSubject, strMessage, strEmail, strDate, strTime
strSQL = "SELECT * FROM Forum"
set objRS = server.CreateObject("ADODB.RecordSet"
objRS.Open strSQL, objConn,1,2
strName = Request.Form("txtName"
strSubject = Request.Form ("txtSubject"
strMessage = Request.Form ("txtMessage"
strEmail = Request.Form("txtEmail"
strDate = (Date)
strTime = (Time)
strMessage = Replace(strMessage,chr(10),"<BR>"
If strName="" or strSubject="" or strMessage="" or strEmail="" Then
Response.Write "Please click <a href=""" &_
"javascript:history.go(-1)"">here</A> to type in your "
Select Case ""
Case strName Response.Write "Name"
Case strSubject Response.Write "Subject"
Case strMessage Response.Write "Message"
Case Else Response.Write "Email"
End Select
Response.Write "" & vbCrLf
End If
Response.End
objRS.AddNew
objRS("Name"
objRS("Subject"
objRS("Message"
objRS("Email"
objRS("Date"
objRS("Time"
objRS.Update
Response.Write "<center>The guestbook has been updated with your message</center>"
Response.Write "<center>Please click <a href='gbook.asp'>here</a> to go back to the guestbook</center>"
%>