Ir para conteúdo

POWERED BY:

Arquivado

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

mcdg

Erro ao inserir, atualizar

Recommended Posts

Pessoal, eu postei ontém sobre permissão do bd, mas o pessoal falou que era erro de sintaxe mesmo, algum expert poderia achar pra mim o que está errado?O erro é

Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. /adm/agenda/inserir.asp, line 115

<%@LANGUAGE="VBSCRIPT"%><!--#include file="../../Connections/dados.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))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")) = "form1" And CStr(Request("MM_recordId")) <> "") Then  MM_editConnection = MM_dados_STRING  MM_editTable = "agenda"  MM_editColumn = "Código"  MM_recordId = "" + Request.Form("MM_recordId") + ""  MM_editRedirectUrl = "../../agenda.asp"  MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showscom|value|entrada|value|apoio|value"  MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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 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 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_editQuery = MM_editQuery & ","    End If    MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_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 Recordset1Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_dados_STRINGRecordset1.Source = "SELECT * FROM agenda"Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><%Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = -1Repeat1__index = 0Recordset1_numRows = Recordset1_numRows + Repeat1__numRows%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Documento sem título</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Atualizar eventos</font></strong><br><% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %><form name="form1" method="POST" action="<%=MM_editAction%>">  <table width="38%" border="0">    <tr>       <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento         :</font></td>      <td width="74%"><input value="<%=((Recordset1.Fields.Item("evento").Value))%>" name="evento" type="text" id="evento"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>      <td><input value="<%=((Recordset1.Fields.Item("data").Value))%>" name="data" type="text" id="data"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local :         </font></td>      <td><input name="local" type="text" id="local" value="<%=((Recordset1.Fields.Item("local").Value))%>"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço         : </font></td>      <td><input name="endereco" type="text" id="endereco" value="<%=((Recordset1.Fields.Item("endereco").Value))%>"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário         :</font></td>      <td><input name="horario" type="text" id="horario" value="<%=((Recordset1.Fields.Item("horario").Value))%>"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com         : </font></td>      <td><input name="showscom" type="text" id="showscom" value="<%=((Recordset1.Fields.Item("showscom").Value))%>"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada         : </font></td>      <td><input name="entrada" type="text" id="entrada" value="<%=((Recordset1.Fields.Item("entrada").Value))%>"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio :         </font></td>      <td><input name="apoio" type="text" id="apoio" value="<%=((Recordset1.Fields.Item("apoio").Value))%>"></td>    </tr>    <tr>       <td> </td>      <td><input type="submit" name="Submit" value="Enviar"></td>    </tr>  </table>  <br>  <input type="hidden" name="MM_update" value="form1">  <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("Código").Value %>">  <br></form><%   Repeat1__index=Repeat1__index+1  Repeat1__numRows=Repeat1__numRows-1  Recordset1.MoveNext()Wend%></body></html><%Recordset1.Close()Set Recordset1 = Nothing%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

você tem certeza que é este código mesmo, copiei e colei aqui e não tem nenhum INSERT INTO nele, Esse e o arquivo Inserir.asp?

Compartilhar este post


Link para o post
Compartilhar em outros sites

você tem certeza que é este código mesmo, copiei e colei aqui e não tem nenhum INSERT INTO nele, Esse e o arquivo Inserir.asp?

Então salgado valeu pela atenção ta aí o código cara...

 

<%@LANGUAGE="VBSCRIPT"%><!--#include file="../../Connections/dados.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))If (Request.QueryString <> "") Then  MM_editAction = MM_editAction & "?" & Request.QueryStringEnd If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Insert Record: set variablesIf (CStr(Request("MM_insert")) = "form1") Then  MM_editConnection = MM_dados_STRING  MM_editTable = "agenda"  MM_editRedirectUrl = "../../agenda.asp"  MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value"  MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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 IfEnd If%><%' *** Insert Record: construct a sql insert statement and execute itDim MM_tableValuesDim MM_dbValuesIf (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 IfEnd If%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Documento sem título</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br><form name="form1" method="POST" action="<%=MM_editAction%>">  <table width="38%" border="0">    <tr>       <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento         :</font></td>      <td width="74%"><input name="evento" type="text" id="evento"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>      <td><input name="data" type="text" id="data"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local :         </font></td>      <td><input name="local" type="text" id="local"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço         : </font></td>      <td><input name="endereco" type="text" id="endereco"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário         :</font></td>      <td><input name="horario" type="text" id="horario"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com         : </font></td>      <td><input name="showcom" type="text" id="showcom"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada         : </font></td>      <td><input name="entrada" type="text" id="entrada"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio :         </font></td>      <td><input name="apoio" type="text" id="apoio"></td>    </tr>    <tr>       <td> </td>      <td><input type="submit" name="Submit" value="Enviar"></td>    </tr>  </table>  <input type="hidden" name="MM_insert" value="form1"></form></body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

DW DWDWDWDW, O programinha pra criar lixo no código!

 

Faz o sequinte, na linha 109 cola esse código:

Response.Write MM_editQuery

Response.Clear

E posta aqui o resultado!

Compartilhar este post


Link para o post
Compartilhar em outros sites

DW DWDWDWDW, O programinha pra criar lixo no código!Faz o sequinte, na linha 109 cola esse código:

Response.Write MM_editQueryResponse.Clear

E posta aqui o resultado!
cara, continuou dando o mesmo erro só mudou a linha...posta ele modificado pra ver se eu fiz certo...valeu mesmo1,ps: DW é f*** mesmo....

Compartilhar este post


Link para o post
Compartilhar em outros sites

Posta aqui o que ele mostrou na tela!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Posta aqui o que ele mostrou na tela!

apareceu isso

Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. /adm/agenda/inserir.asp, line 118

e o código ficou assim
<%@LANGUAGE="VBSCRIPT"%><!--#include file="../../Connections/dados.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))If (Request.QueryString <> "") Then  MM_editAction = MM_editAction & "?" & Request.QueryStringEnd If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Insert Record: set variablesIf (CStr(Request("MM_insert")) = "form1") Then  MM_editConnection = MM_dados_STRING  MM_editTable = "agenda"  MM_editRedirectUrl = "../../agenda.asp"  MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value"  MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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 IfEnd If%><%' *** Insert Record: construct a sql insert statement and execute itDim MM_tableValuesDim MM_dbValuesIf (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 Response.Write MM_editQueryResponse.Clear 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 IfEnd If%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Documento sem título</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br><form name="form1" method="POST" action="<%=MM_editAction%>">  <table width="38%" border="0">    <tr>       <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento         :</font></td>      <td width="74%"><input name="evento" type="text" id="evento"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>      <td><input name="data" type="text" id="data"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local :         </font></td>      <td><input name="local" type="text" id="local"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço         : </font></td>      <td><input name="endereco" type="text" id="endereco"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário         :</font></td>      <td><input name="horario" type="text" id="horario"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com         : </font></td>      <td><input name="showcom" type="text" id="showcom"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada         : </font></td>      <td><input name="entrada" type="text" id="entrada"></td>    </tr>    <tr>       <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio :         </font></td>      <td><input name="apoio" type="text" id="apoio"></td>    </tr>    <tr>       <td> </td>      <td><input type="submit" name="Submit" value="Enviar"></td>    </tr>  </table>  <input type="hidden" name="MM_insert" value="form1"></form></body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Só uma coisinha, acho q meu tiu salgado se enganou:

 

Troque:

 

Response.Clear

 

por:

 

Response.End()

 

hehehehehe, coisa de "idoso" B)

então cara, eu troquei aqui e aconteceu uma coisa estranha...

 

depois que eu cliquei no submit, a tela ficou branca, não deu erro, porém nao inseriu nada no bd

 

valew

 

1,

Compartilhar este post


Link para o post
Compartilhar em outros sites
<%@LANGUAGE="VBSCRIPT"%>

<!--#include file="../../Connections/dados.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_dados_STRING

MM_editTable = "agenda"

MM_editRedirectUrl = "../../agenda.asp"

MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value"

MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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 & ")"

Response.Write MM_editQuery

Response.End()

 

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

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Documento sem título</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

<font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br>

<form name="form1" method="POST" action="<%=MM_editAction%>">

<table width="38%" border="0">

  <tr>

    <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento

      :</font></td>

    <td width="74%"><input name="evento" type="text" id="evento"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>

    <td><input name="data" type="text" id="data"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local :

      </font></td>

    <td><input name="local" type="text" id="local"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço

      : </font></td>

    <td><input name="endereco" type="text" id="endereco"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário

      :</font></td>

    <td><input name="horario" type="text" id="horario"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com

      : </font></td>

    <td><input name="showcom" type="text" id="showcom"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada

      : </font></td>

    <td><input name="entrada" type="text" id="entrada"></td>

  </tr>

  <tr>

    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio :

      </font></td>

    <td><input name="apoio" type="text" id="apoio"></td>

  </tr>

  <tr>

    <td> </td>

    <td><input type="submit" name="Submit" value="Enviar"></td>

  </tr>

</table>

<input type="hidden" name="MM_insert" value="form1">

</form>

</body>

</html>

Tenta com esse

 

 

Valeu Bicicletia, DW é um saco, e acaba confundindo a cabeça (Idoso é?)

Compartilhar este post


Link para o post
Compartilhar em outros sites

tá parecendo novela mexicana (risos)

 

agora além de nao atualizar, apareceu isso

 

insert into agenda (evento,data,local,endereco,horario,showscom,entrada,apoio) values ('dkn','nm','n',',mn','n','mn','mn',',m')

 

se puder ajudar, ficarei realmente agradecido, to doido com isso já

 

1,

Compartilhar este post


Link para o post
Compartilhar em outros sites

Todos os campos do BD são texto?

Compartilhar este post


Link para o post
Compartilhar em outros sites

eu uso o access e é só texto mesmo cara....coisa simples, é uma agenda de shows, tem data, local, horário etc..valew1,

Compartilhar este post


Link para o post
Compartilhar em outros sites

Modo clássico, tenta essa alteração e veja se rola:

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/dados.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_dados_STRING
MM_editTable = "agenda"
MM_editRedirectUrl = "../../agenda.asp"
MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value"
MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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
If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
Dim evento,data,local,endereco,horario,showscom,entrada,apoio
If Request("evento") <> "" Then
 evento = CStr(Replace(Request("evento"),"'","''"))
Else
 evento = ""
End If
If Request("data") <> ""
data = CStr(Replace(Request("data"),"'","''"))
Else
data = ""
End If
If Request("local") <> ""
local = CStr(Replace(Request("local"),"'","''"))
Else
local = ""
End If
If Request("endereco") <> ""
endereco = CStr(Replace(Request("endereco"),"'","''"))
Else
endereco = ""
End If
If Request("horario") <> ""
horario = CStr(Replace(Request("horario"),"'","''"))
Else
horario = ""
End If
If Request("showscom") <> ""
showscom = CStr(Replace(Request("showscom"),"'","''"))
Else
showscom = ""
End If
If Request("entrada") <> ""
entrada = CStr(Replace(Request("entrada"),"'","''"))
Else
entrada = ""
End If
If Request("apoio") <> ""
apoio = CStr(Replace(Request("apoio"),"'","''"))
Else
apoio = ""
End If

MM_editQuery = "insert into agenda (evento,data,local,endereco,horario,showscom,entrada,apoio) values ('"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"')"

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
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sem título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br>
<form name="form1" method="POST" action="<%=MM_editAction%>">
<table width="38%" border="0">
 <tr> 
   <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento 

     :</font></td>
   <td width="74%"><input name="evento" type="text" id="evento"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>
   <td><input name="data" type="text" id="data"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local : 
     </font></td>
   <td><input name="local" type="text" id="local"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço 
     : </font></td>
   <td><input name="endereco" type="text" id="endereco"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário 
     :</font></td>
   <td><input name="horario" type="text" id="horario"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com 
     : </font></td>
   <td><input name="showcom" type="text" id="showcom"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada 
     : </font></td>
   <td><input name="entrada" type="text" id="entrada"></td>
 </tr>
 <tr> 
   <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio : 
     </font></td>
   <td><input name="apoio" type="text" id="apoio"></td>
 </tr>
 <tr> 
   <td> </td>
   <td><input type="submit" name="Submit" value="Enviar"></td>
 </tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

cara, agora o erro apareceui antes mesmo de fazer a atualizacao o form nem apareceu

Microsoft VBScript compilation error '800a03f9' Expected 'Then' /adm/agenda/inserir.asp, line 81 If Request("data") <> ""------------------------^

1,

Compartilhar este post


Link para o post
Compartilhar em outros sites

cara , nao deu certo....ta f***...será que alguem pode resolver isso por favorolhem o primeiro codigo que eu coloquei, tava dando so o erro do insert into....por favorvalewDg1,

Compartilhar este post


Link para o post
Compartilhar em outros sites

Gente , vamos voltar do zero...Tenho um código para inserir dados em um bd...mas ao tentar inserir dados o seguinte erro aparece

Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. /adm/agenda/inserir.asp, line 115

e o código que está é o seguinte
<%@LANGUAGE="VBSCRIPT"%><!--#include file="../../Connections/dados.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryStringEnd If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Insert Record: set variablesIf (CStr(Request("MM_insert")) = "form1") Then MM_editConnection = MM_dados_STRING MM_editTable = "agenda" MM_editRedirectUrl = "../../agenda.asp" MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value" MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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 IfEnd If%><%' *** Insert Record: construct a sql insert statement and execute itDim MM_tableValuesDim MM_dbValuesIf (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 IfEnd If%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Documento sem título</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br><form name="form1" method="POST" action="<%=MM_editAction%>"> <table width="38%" border="0">   <tr>      <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento        :</font></td>     <td width="74%"><input name="evento" type="text" id="evento"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>     <td><input name="data" type="text" id="data"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local :        </font></td>     <td><input name="local" type="text" id="local"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço        : </font></td>     <td><input name="endereco" type="text" id="endereco"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário        :</font></td>     <td><input name="horario" type="text" id="horario"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com        : </font></td>     <td><input name="showcom" type="text" id="showcom"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada        : </font></td>     <td><input name="entrada" type="text" id="entrada"></td>   </tr>   <tr>      <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio :        </font></td>     <td><input name="apoio" type="text" id="apoio"></td>   </tr>   <tr>      <td> </td>     <td><input type="submit" name="Submit" value="Enviar"></td>   </tr> </table> <input type="hidden" name="MM_insert" value="form1"></form></body></html>
O pessoal tentou me ajudar mas até agora nada deu certo...preciso muito resolver esse problema....agradeço a quem puder ajudar...1,

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tenta com esse, é o mesmo que postei lá em cima, mas com pequenas correções:

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/dados.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_dados_STRING
MM_editTable = "agenda"
MM_editRedirectUrl = "../../agenda.asp"
MM_fieldsStr  = "evento|value|data|value|local|value|endereco|value|horario|value|showcom|value|entrada|value|apoio|value"
MM_columnsStr = "evento|',none,''|data|',none,''|local|',none,''|endereco|',none,''|horario|',none,''|showscom|',none,''|entrada|',none,''|apoio|',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
If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
Dim evento,data,local,endereco,horario,showscom,entrada,apoio
If Request("evento") <> "" Then
evento = CStr(Replace(Request("evento"),"'","''"))
Else
evento = ""
End If
If Request("data") <> "" Then
data = CStr(Replace(Request("data"),"'","''"))
Else
data = ""
End If
If Request("local") <> "" Then
local = CStr(Replace(Request("local"),"'","''"))
Else
local = ""
End If
If Request("endereco") <> "" Then
endereco = CStr(Replace(Request("endereco"),"'","''"))
Else
endereco = ""
End If
If Request("horario") <> "" Then
horario = CStr(Replace(Request("horario"),"'","''"))
Else
horario = ""
End If
If Request("showscom") <> "" Then
showscom = CStr(Replace(Request("showscom"),"'","''"))
Else
showscom = ""
End If
If Request("entrada") <> "" Then
entrada = CStr(Replace(Request("entrada"),"'","''"))
Else
entrada = ""
End If
If Request("apoio") <> "" Then
apoio = CStr(Replace(Request("apoio"),"'","''"))
Else
apoio = ""
End If

MM_editQuery = "insert into agenda (evento,data,local,endereco,horario,showscom,entrada,apoio) values ('"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"')"

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
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sem título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inserir eventos</strong></font><br>
<form name="form1" method="POST" action="<%=MM_editAction%>">
<table width="38%" border="0">
<tr> 
  <td width="26%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Evento 

    :</font></td>
  <td width="74%"><input name="evento" type="text" id="evento"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Data : </font></td>
  <td><input name="data" type="text" id="data"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Local : 
    </font></td>
  <td><input name="local" type="text" id="local"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endereço 
    : </font></td>
  <td><input name="endereco" type="text" id="endereco"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Horário 
    :</font></td>
  <td><input name="horario" type="text" id="horario"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Show com 
    : </font></td>
  <td><input name="showcom" type="text" id="showcom"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Entrada 
    : </font></td>
  <td><input name="entrada" type="text" id="entrada"></td>
</tr>
<tr> 
  <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Apoio : 
    </font></td>
  <td><input name="apoio" type="text" id="apoio"></td>
</tr>
<tr> 
  <td> </td>
  <td><input type="submit" name="Submit" value="Enviar"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

olha o erro que deu ai cara

Microsoft VBScript compilation error '800a03ea' Syntax error /adm/agenda/inserir.asp, line 117 MM_editQuery = "insert into agenda (evento,data,local,endereco,horario,showscom,entrada,apoio) values ('"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"','"&&"')"----------------------------------------------------------------------------------------------------------^

1,

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.