Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Wfox

Erro no sistema de alteração

Recommended Posts

Estou com seguinte erroTipo de erro:Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)[Microsoft][Driver ODBC para Microsoft Access] Parâmetros insuficientes. Eram esperados 1./cadastro/atualizar_form.asp, line 89COD<%@LANGUAGE="VBSCRIPT"%><!--#include file="Connections/cadastro.asp" --><%MM_editAction = CStr(Request("URL"))If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryStringEnd If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Update Record: set variablesIf (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then MM_editConnection = MM_cadastro_STRING MM_editTable = "cadastro_cliente" MM_editColumn = "cod" MM_recordId = "" + Request.Form("MM_recordId") + "" MM_editRedirectUrl = "confirma_atualizacao.asp" MM_fieldsStr = "dia|value|hora|value|transacao|value|descricao|value|atendente|value|nchamao|value|analista|value|comentario|value|horar|value|nivel|value" MM_columnsStr = "dia|',none,''|hora|',none,''|transacao|',none,''|descricao|',none,''|atendente|',none,''|nchamado|',none,''|analista|',none,''|comentario|',none,''|horar|',none,''|nivel|',none,NULL" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(i+1) = CStr(Request.Form(MM_fields(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 IfEnd If%><%' *** Update Record: construct a sql update statement and execute itIf (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then ' create the sql update statement MM_editQuery = "update " & MM_editTable & " set " For i = LBound(MM_fields) To UBound(MM_fields) Step 2 FormVal = MM_fields(i+1) MM_typeArray = Split(MM_columns(i+1),",") Delim = MM_typeArray(0) If (Delim = "dia") Then Delim = "" AltVal = MM_typeArray(1) If (AltVal = "dia") Then AltVal = "" EmptyVal = MM_typeArray(2) If (EmptyVal = "dia") Then EmptyVal = "" If (FormVal = "") Then FormVal = EmptyVal Else If (AltVal <> "") Then FormVal = AltVal ElseIf (Delim = "'") Then ' escape quotes FormVal = "'" & Replace(FormVal,"'","''") & "'" Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & "," End If MM_editQuery = MM_editQuery & MM_columns(i) & " = " & FormVal Next MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' execute the update 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 IfEnd If%><%Dim Recordset1__CodRecordset1__Cod = "0"if (request.querystring("cadastro_cliente") <> "") then Recordset1__Cod = request.querystring("cadastro_cliente") %><%set Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_cadastro_STRINGRecordset1.Source = "SELECT * FROM cadastro_cliente WHERE cod = " + Replace(Recordset1__Cod, "'", "''") + ""Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 3Recordset1.Open()Recordset1_numRows = 0%><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#FFFFFF" text="#000000"><form method="post" action="<%=MM_editAction%>" name="form1"> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" width="80%"> <tr> <td width="100%" bgcolor="#6699FF"> <p align="center"><b><font color="#FFFFFF">Atualização de Chamado</font></b></td> </tr> </table> </center> </div> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" width="80%" bordercolor="#C0C0C0" style="border-style: double; border-color: #6699FF"> <tr> <td width="17%">Data:</td> <td width="33%"> <input type="text" name="data" value="<%=(Recordset1.Fields.Item("dia").Value)%>" size="32"> </td> <td width="25%">Horário:</td> <td width="25%"> <input type="text" name="hora" value="<%=(Recordset1.Fields.Item("hora").Value)%>" size="32"> </td> </tr> <tr> <td width="17%">Transações:</td> <td width="33%"> <input type="text" name="transacao" value="<%=(Recordset1.Fields.Item("transacao").Value)%>" size="32"> </td> <td width="25%">Descrição:</td> <td width="25%"> <input type="text" name="descricao" value="<%=(Recordset1.Fields.Item("descricao").Value)%>" size="32"> </td> </tr> <tr> <td width="17%">Atendente:</td> <td width="33%"> <input type="text" name="atendente" value="<%=(Recordset1.Fields.Item("atendente").Value)%>" size="32"> </td> <td width="25%">Numero do chamado:</td> <td width="25%"> <input type="text" name="nchamado" value="<%=(Recordset1.Fields.Item("nchamado").Value)%>" size="32"> </td> </tr> <tr> <td width="17%">Analista:</td> <td width="33%"> <input type="text" name="analista" value="<%=(Recordset1.Fields.Item("analista").Value)%>" size="32"> </td> <td width="25%"> </td> <td width="25%"> </td> </tr> </table> </center> </div> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" width="80%" bgcolor="#FFFFFF" bordercolor="#C0C0C0" style="border-style: double; border-color: #6699FF" height="44"> <tr> <td width="100%" height="19">Comentário:</td> </tr> <tr> <td width="100%" height="21"> <input type="text" name="comentario" value="<%=(Recordset1.Fields.Item("comentario").Value)%>" size="32"> </td> </tr> </table> </center> </div> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" width="80%" bordercolor="#C0C0C0" style="border: 0 double #6699FF"> <tr> <td width="25%">Horário Rest :</td> <td width="25%"> <input type="text" name="horar" value="<%=(Recordset1.Fields.Item("horar").Value)%>" size="32"> </td> <td width="25%">Nível 2 :</td> <td width="25%"> <input type="text" name="nivel" value="<%=(Recordset1.Fields.Item("nivel").Value)%>" size="32"> </td> </tr> </table> </center> </div> <table align="center"> <tr valign="baseline" bgcolor="#6699FF"> <td nowrap align="right" bgcolor="#FFFFFF"> <div align="center"> <input type="submit" value="( Atualizar )"> </div> </td> </tr> </table> <input type="hidden" name="MM_update" value="true"> <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("cod").Value %>"></form></body></html><%Recordset1.Close()%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Artigos, Dicas, Tutoriais e Materias (ASP) http://forum.imasters.com.br/public/style_emoticons/default/seta.gif ASP

 

Provavelmente tem algum campo ou tabela com o nome errado ou sem valor

 

Verifique isso

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.