O fórum não consegue ser gravado no banco de dados, porém isso só acontece no servidor, pois no pws ele roda e grava normalmente no banco de dados........... dá um erro, que me parece dizer que eu preciso de uma certa atualização de um tal "Microsoft Jet 4.0"........ Não consigo entender........
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/antiquado/forum/PreviewMessage.asp, line 107
Veja o código fonte do arquivo PreviewMessage.asp:
<!--#include file = "database.inc"-->
<%
Function isBlank(Value)
if isNull(Value) then
bAns = true
else
bAns = trim(Value) = ""
end if
isBlank = bAns
end function
Function FixNull(Value)
if isNull(Value) then
sAns = ""
else
sAns = trim(Value)
end if
FixNull = sAns
end function
Function prepStringForSQL(sValue)
Dim sAns
sAns = Replace(sValue, Chr(39), "''")
sAns = "'" & sAns & "'"
prepStringForSQL = sAns
End Function
function ReplaceComments(sInput)
dim sAns
sAns = replace(sInput, " ", " ")
sAns = replace(sAns, chr(34), """)
sAns = replace(sAns, "<!--", "<!--")
sAns = replace(sAns, "-->", "-->")
ReplaceComments = sAns
end function
function HTMLFormat(sInput)
dim sAns
sAns = replace(sInput, " ", " ")
sAns = replace(sAns, chr(34), """)
sIllStart = "<" & chr(37)
sIllEnd = chr(37) & ">"
if instr(sAns, sIllStart) > 0 or instr(sAns, sIllEnd) > 0 then
sAns = replace(sAns, "<" & chr(37), "")
sAns = replace(sAns, chr(37) & ">", "")
bIllegal = true
end if
sAns = replace(sAns, ">", ">")
sAns = replace(sAns, "<", "<")
sAns = replace(sAns, vbcrlf, "<BR>")
HTMLFormat = sAns
end function
if Request("SubmitMessage") <> "" then bNew = true
if request("SubmitReply") <> "" or request("Reply") <> "" then bReply = true
if request("ApplyMessage") <> "" then bApply = true
Pergunta
Guest Marcelo Amarante
O fórum não consegue ser gravado no banco de dados, porém isso só acontece no servidor, pois no pws ele roda e grava normalmente no banco de dados........... dá um erro, que me parece dizer que eu preciso de uma certa atualização de um tal "Microsoft Jet 4.0"........ Não consigo entender........
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/antiquado/forum/PreviewMessage.asp, line 107
Veja o código fonte do arquivo PreviewMessage.asp:
<!--#include file = "database.inc"-->
<%
Function isBlank(Value)
if isNull(Value) then
bAns = true
else
bAns = trim(Value) = ""
end if
isBlank = bAns
end function
Function FixNull(Value)
if isNull(Value) then
sAns = ""
else
sAns = trim(Value)
end if
FixNull = sAns
end function
Function prepStringForSQL(sValue)
Dim sAns
sAns = Replace(sValue, Chr(39), "''")
sAns = "'" & sAns & "'"
prepStringForSQL = sAns
End Function
function ReplaceComments(sInput)
dim sAns
sAns = replace(sInput, " ", " ")
sAns = replace(sAns, chr(34), """)
sAns = replace(sAns, "<!--", "<!--")
sAns = replace(sAns, "-->", "-->")
ReplaceComments = sAns
end function
function HTMLFormat(sInput)
dim sAns
sAns = replace(sInput, " ", " ")
sAns = replace(sAns, chr(34), """)
sIllStart = "<" & chr(37)
sIllEnd = chr(37) & ">"
if instr(sAns, sIllStart) > 0 or instr(sAns, sIllEnd) > 0 then
sAns = replace(sAns, "<" & chr(37), "")
sAns = replace(sAns, chr(37) & ">", "")
bIllegal = true
end if
sAns = replace(sAns, ">", ">")
sAns = replace(sAns, "<", "<")
sAns = replace(sAns, vbcrlf, "<BR>")
HTMLFormat = sAns
end function
if Request("SubmitMessage") <> "" then bNew = true
if request("SubmitReply") <> "" or request("Reply") <> "" then bReply = true
if request("ApplyMessage") <> "" then bApply = true
bValid = bNew or bReply or bApply
if bApply then
sName = request("AuthorName")
sEmail = request("AuthorEmail")
bAddNew = request("MessageType") = "New"
if bAddNew then
sTopic = prepStringForSQL(Request("Topic")) & ","
sName = prepStringForSQL(sName) & ","
sEmail= prepStringForSQL(sEmail) & ","
sComments = ReplaceComments(Request("Message"))
sComments = prepStringForSQL(sComments)
sSQL = "INSERT INTO FORUM_MESSAGES (AUTHORNAME,AUTHOREMAIL,TOPIC,COMMENTS) VALUES (" & sName & sEmail & sTopic & sComments & ")"
conn.execute sSQL
sSQL = "UPDATE FORUM_MESSAGES SET THREADPARENT = ID WHERE THREADPARENT = 0"
conn.execute sSQL
else
sOrigAuthor = Request("OrigAuthor")
if sOrigAuthor = "" then sOrigAuthor = Request.QueryString("OrigAuthor")
iThread = Request("ThreadID")
iParent = Request("ParentID")
sName = prepStringForSQL(sName) & ","
sEmail= prepStringForSQL(sEmail) & ","
sTopic = prepStringForSQL(Request("Topic")) & ","
sComments = prepStringForSQL(Request("Message"))
if iThread = 0 then iThread = iParent
sSQL = "INSERT INTO FORUM_MESSAGES (PARENTMESSAGE,THREADPARENT,AUTHORNAME,AUTHOREMAIL,TOPIC,COMMENTS) VALUES (" & iParent & "," & iThread & "," & sName & sEmail & sTopic & sComments & ")"
[FONT=Arial]conn.execute sSQL
cmd.CommandText = "LASTMESSAGE"
cmd.CommandType = 4
set rs = cmd.Execute
sID = rs("ID")
rs.close
sSQL = "UPDATE FORUM_MESSAGES SET REPLYCOUNT = REPLYCOUNT + 1, LASTTHREADPOST = NOW() WHERE ID = " & iThread
conn.execute sSQL
end if 'bAddNew
%>
<!--#include file = "database_cleanup.inc"-->
<%
response.redirect "default.asp"
end if 'bApply
%>
<HTML>
<HEAD>
<TITLE>DISCUSSON FORUM: PREVIEW MESSAGE</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY BGCOLOR = "#FFFFFF">
<%
if not bValid then
response.write "You cannot navigate to this page without entering a forum message. Please "
response.write "return to the <A HREF = 'default.asp'>forum index</A> and try again."
response.end
end if
'Write to db and redirect home.
response.write "<HR>"
if bReply then
ParentID = Request("ParentID")
ThreadID = request("ThreadID")
sOrigAuthor = request("OrigAuthor")
end if
sTopic = request("Topic")
if sOrigAuthor = "" then sOrigAuthor = request.QueryString("OrigAuthor")
sOrigMessage = HTMLFormat(Request("Message"))
%>
<CENTER><FONT COLOR=#808080 face="Tahoma"><B>Mensagem de Confirmação</B></FONT></CENTER>
<P align="center">
<font face="MS Sans Serif" size="1">Se os dados abaixo estiverem corretos,
clique no botão OK. Caso contrário,
volte através do botão "voltar" do seu navegador para fazer as correções
necessárias.</font><P>
<FORM ACTION = "PreviewMessage.asp" METHOD = "POST">
<% if bReply Then %>
<INPUT TYPE="HIDDEN" NAME="ParentID" VALUE="<%= ParentID %>">
<INPUT TYPE="HIDDEN" NAME="ThreadID" VALUE="<%= ThreadID %>">
<INPUT TYPE="HIDDEN" NAME="OrigAuthor" VALUE="<%= sOrigAuthor %>">
<% end if %>
<INPUT TYPE="HIDDEN" NAME="Topic" VALUE="<%= sTopic %>">
<INPUT TYPE="HIDDEN" NAME="Message" VALUE="<%= sOrigMessage %>">
<INPUT TYPE="HIDDEN" NAME="AuthorName" VALUE="<%= Request("Name") %>">
<INPUT TYPE="HIDDEN" NAME="AuthorEmail" VALUE="<%= Request("Email") %>">
<INPUT TYPE = "HIDDEN" NAME = "MessageType"
<% if bReply then
Response.Write "VALUE = 'REPLY'"
else
Response.Write "VALUE = 'New'"
end if
%>
>
<TABLE>
<TR><TD><font face="Terminal" size="1"><B>Topic:</FONT></B></font></TD>
<TD><%= sTopic %></TD></TR>
<TR><TD> </TD></TR>
<TR><TD COLSPAN = 2><font face="Terminal" size="1"><B>Message:</B></font></TD></TR>
</TABLE>
<TABLE WIDTH = 95%><TR>
<TR>
<TD WIDTH = 100%>
<%= sOrigMessage %>
</TD></TR></TABLE><P>
<CENTER>
<INPUT TYPE="submit" NAME = "ApplyMessage" VALUE = "ok" style="font-family: Verdana; font-size: 10 px; letter-spacing: -1pt; font-weight: bold; border-style: solid; border-width: 1; padding: 0"></CENTER>
<!--#include file = "footer.inc"-->
</FORM>
<%
if bIllegal then %>
<FONT COLOR = "RED" SIZE = = -1>Your message was altered to delete the ASP delimiters <<%= chr(37) %> and <%= chr(37) %>>
</FONT><P>
<% end if %><!--#include file = "database_cleanup.inc"--></HTML>
O ERRO ESTÁ NA LINHA 107
Por Favor, me ajudem..... Ficarei grato..... espero respostas.......
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.