Publicidade
|
|
microsoft JET database error (0x80004005)
#1
Posted 30 November 2004 - 06:57 PM
Tipo de erro:
Microsoft JET Database Engine (0x80004005)
A operação deve usar uma consulta atualizável.
/news/cadastro.asp, line 115
alguem pode me ajudar com isso, pq ja estou enlouquecendo e nao consigo fazer isso dar certo...
abs
ps: o codigo:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/conexao.asp" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form1") Then
MM_editConnection = MM_conexao_STRING
MM_editTable = "tabelanoticias"
MM_editRedirectUrl = "lista.asp"
MM_fieldsStr = "TITULO_NOTICIA|value|TEXTO_NOTICIA|value|AUTOR|value|FONTE|value|STATUS|value"
MM_columnsStr = "TITULO_NOTICIA|',none,''|TEXTO_NOTICIA|',none,''|AUTOR|',none,''|FONTE|',none,''|STATUS|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<html>
<head>
<title>||||Cadastro de Notícias||||</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="75%" border="0">
<tr>
<td align="left" valign="top"> <div align="left">
<form name="form1" method="POST" action="<%=MM_editAction%>">
<table width="75%" border="0">
<tr>
<td height="29" colspan="3"> <div align="center"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif"><strong>Cadastro
de Notícias</strong></font></div></td>
</tr>
<tr>
<td width="15%"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif">Título:</font></td>
<td width="85%" colspan="2"> <input name="TITULO_NOTICIA" type="text" id="TITULO_NOTICIA"></td>
</tr>
<tr>
<td height="79"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif">Notícia:</font></td>
<td colspan="2"> <textarea name="TEXTO_NOTICIA" cols="35" id="TEXTO_NOTICIA"></textarea></td>
</tr>
<tr>
<td height="31"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif">Autor:</font></td>
<td colspan="2"> <input name="AUTOR" type="text" id="AUTOR"></td>
</tr>
<tr>
<td height="31"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif">Fonte:</font></td>
<td colspan="2"> <input name="FONTE" type="text" id="FONTE"></td>
</tr>
<tr>
<td height="31"><font color="#333333" face="Verdana, Arial, Helvetica, sans-serif">Status:</font></td>
<td> <input type="radio" name="STATUS" value="ativa"> <font face="Verdana, Arial, Helvetica, sans-serif">Ativa</font></td>
<td> <input type="radio" name="STATUS" value="inativa"> <font face="Verdana, Arial, Helvetica, sans-serif">Inativa</font></td>
</tr>
<tr>
<td height="39"> </td>
<td colspan="2"> <input type="submit" name="Submit" value="Gravar"></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</div></td>
</tr>
</table>
</body>
</html>
#2 Guest__UsP__*
Posted 30 November 2004 - 07:22 PM
T+
#6
Posted 02 December 2004 - 05:39 PM
falei bobagem não posso deletar esse topico não?
This post has been edited by deividy: 02 December 2004 - 05:41 PM
#7
Posted 03 December 2004 - 12:01 PM
Mais um pouco e eu fico louco com essa parada!!!
#8
Posted 03 December 2004 - 12:35 PM
o nom que quero é o nome que vc coloco nos campos ex
<input... name="esse"
entendeu
diz ai quali são
o outra cosia vc está inserindo ou editando campos com isso?
#10
Posted 03 December 2004 - 02:41 PM
os nomes dos meus campos são:
TITULO_NOTICIA
TEXTO_NOTICIA
AUTOR
FONTE
STATUS
estou testando no meu computador´, e não no servidor.
o outra cosia vc está inserindo ou editando campos com isso? -> não entendi essa pergunta, vc poderia me explicar melhor?
#11
Posted 06 December 2004 - 04:22 PM
foi iss oque eu quis dizer
vc já tentou fazer essa página de novo?
#12
Posted 07 December 2004 - 01:56 AM
#13
Posted 07 December 2004 - 11:31 AM
como ele esta escrito na página
tem tags assim?
<%%>
#15
Posted 07 December 2004 - 04:37 PM
<!-- #include file=arquivo.asp -->
se ele já tiver ações a serem executadas ele ao ser integrada a página ele vai ser mostrada no browser
mais contando que o página em questão não sejá uma página web correto, digo não tenha tag de html fora do asp
qualquer coisa pergunta ai
#16
Posted 07 December 2004 - 07:22 PM
consegui colocar a pagina atraves de um I FRAME.
so precisava saber como fazer agora pra ela caber direitinho dentro da tabela que reservei para exibição, visto que no sistema que construi a pagina tem um tamanho normal.
outra coisa: como fazer pra controlar a fonte e o tamanho da letra no sistema? tentei colocar uma css no drewamweaver depois de pronto mas nao adiantou...
#17
Posted 08 December 2004 - 10:19 AM
hehe
bom vc tem que ver onde estão as saidas da resposta do código em asp podendo colocar o código nas saidas
entendeu?
Share this topic:
Similar Topics
| Topic | Forum | Started By | Stats | Last Post Info | |
|---|---|---|---|---|---|
|
Esclarecimento pré projeto
esclarecimento de dúvidas para um projeto em flash |
Flash & ActionScript |
wellausen
|
|
|
|
Microsoft abre sua primeira loja nos Estados Unidos
|
Notícias |
Notícias
|
|
|
|
Globo projeta TV digital rural para substituir parabólica
|
Notícias |
Notícias
|
|
|
|
Microsoft diz que sucesso do Google foi um alerta
|
Notícias |
Notícias
|
|
|
|
Microsoft retoma negociações com Yahoo! para aliança
|
Notícias |
Notícias
|
|
|
|
hitTest com 853 Objetos
Problema meio Cabuloso, solução inviável |
Flash & ActionScript |
Lucas WDM
|
|
|
|
Microsoft lança prévia do Explorer 9, que não funciona no XP
|
Notícias |
Notícias
|
|
|
|
Microsoft prevê bilhões em vendas com transição para o VoIP
|
Notícias |
Notícias
|
|
Publicidade
|
|

Help













