Jump to content


Photo

Duvida Em Check Box


  • Faça o login para participar
21 replies to this topic

#16 Guest

Guest
  • Visitantes

Posted 07/10/2003, 19:01

<% sqlExcluir = "DELETE * FROM tabela WHERE id IN("&Request("Campo")&")"
SuaConexao.Execute(sqlExcluir) %>

tenta isso ai!

#17 crazybaby

crazybaby

    Cyber Eye

  • Banidos
  • PipPipPipPipPipPipPipPipPip
  • 1112 posts
  • Sexo:Não informado
  • Localidade:Divinopolis-MG
  • Interesses:ASP &amp; Design

Posted 07/10/2003, 20:10

ae eu tirei o "on error resume next" e o erro tah mostrando q é na linha q começa o lbound

For x = Lbound(Request.QueryString("checkbox")) To Ubound(Request.QueryString("checkbox"))
set rs = conexao.execute("delete * from anotacao where id = " & Request.QueryString("checkbox")(x) & ";")
Next




Erro de tempo de execução do Microsoft VBScript error '800a000d'

Tipo incompatível: 'Lbound'

/testes/acao_apagar.asp, line 10

#18 crazybaby

crazybaby

    Cyber Eye

  • Banidos
  • PipPipPipPipPipPipPipPipPip
  • 1112 posts
  • Sexo:Não informado
  • Localidade:Divinopolis-MG
  • Interesses:ASP &amp; Design

Posted 08/10/2003, 16:24

ta boim gente desisti de vez de fazer com check box e resolvi faewr com radio button mas naum tah funfanu tbm!

olha aí no acaoi_apagar ele aparece q deletou mas na hora q olho e naum deletou.....


escolha_apagar.asp

<!--#include file="conexao.asp"-->
<%
set rs = conexao.execute("select * from anotacao")
%>
<html>
<head>
<title>::Sistema de Anota&ccedil;&atilde;o::By CrazyBaby</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p align="center"><font size="4">Apagar</font></p>
<form method="get" action="acao_apagar.asp">
  <table width="91%" border="0" align="center" cellpadding="1" cellspacing="1">
    <tr bgcolor="#666666">
      <td width="4%"><div align="center"><strong><font color="#FFFFFF">ID:</font></strong></div></td>
      <td width="16%"><div align="center"><strong><font color="#666666"><font color="#FFFFFF">T&iacute;tulo:</font></font></strong></div></td>
      <td width="52%"><div align="center"><strong><font color="#666666"><font color="#FFFFFF">Link:</font></font></strong></div></td>
      <td width="21%"><div align="center"><strong><font color="#666666"><font color="#FFFFFF">Descri&ccedil;&atilde;o:</font></font></strong></div></td>
      <td width="7%"><div align="center"><strong><font color="#FFFFFF">
          <input type="submit" name="alterar" value="Apagar">
          </font></strong></div></td>
    </tr>
    <%while not rs.eof%>
    <tr bgcolor="#CCCCCC">
      <td><font color="#000000"><%=rs("id")%></font></td>
      <td><font color="#000000"><%=rs("titulo")%></font></td>
      <td><font color="#000000"><%=rs("link")%></font></td>
      <td><font color="#000000"><%=rs("descricao")%></font></td>
      <td><div align="center"> <font color="#000000">
          <input name="id" type="radio" value="ok">
          </font></div></td>
    </tr>
    <%
rs.movenext
wend
rs.close
conexao.close
set rs = nothing
set conexao = nothing
%>
  </table>
</form>
<p><font size="4"></font></p>
</body>
</html>



acao_apagar.asp


<!--#include file="conexao.asp"-->
<html>
<head>
<title>::Sistema de Anota&ccedil;&atilde;o::By CrazyBaby</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
id = request.QueryString("id")
if id = "ok" then
sql = "delete * from anotacao where id='"&id&"'"
set rs = conexao.execute(sql)
end if
%>
<div align="center">Os dados selecionados foram apagados do banco com sucesso. <br>
  <a href="default.asp">Voltar a administrar </a> </div>
</div>
</body>
</html>



#19 Info_Tec

Info_Tec

    Servo do DEUS VIVO!

  • Usuários
  • 398 posts
  • Sexo:Não informado
  • Localidade:Entre a cadeira e o teclado
  • Interesses:Jesus, minha esposa e filha.<br>ASP, Lógica de programação, Projeto de Estradas, $$$ que tô precisando!

Posted 08/10/2003, 17:07

Com os checkboxes está exatamente da forma como postei?
A cada minuto está mais perto.
Aceite JESUS como seu único e suficiente salvador!
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Fórum HOSANAS, venha conversar e se engrandecer com a palavra de DEUS.
Host: ASPECTO, Hospedagem ASP com qualidade e bom preço.

#20 crazybaby

crazybaby

    Cyber Eye

  • Banidos
  • PipPipPipPipPipPipPipPipPip
  • 1112 posts
  • Sexo:Não informado
  • Localidade:Divinopolis-MG
  • Interesses:ASP &amp; Design

Posted 09/10/2003, 15:21

Com os checkboxes está exatamente da forma como postei?

SIM
tow usando o PWS

#21 Rafael 001

Rafael 001

    Burguesia Infame

  • Banidos
  • PipPipPip
  • 191 posts
  • Sexo:Não informado
  • Localidade:Curitiba - Paraná

Posted 09/10/2003, 18:04

<% sqlExcluir = "DELETE * FROM tabela WHERE id IN("&Request("Campo")&")"
SuaConexao.Execute(sqlExcluir) %>

tenta isso ai!

vc tentou com esse ai?
Burguesia Infame!!!

#22 crazybaby

crazybaby

    Cyber Eye

  • Banidos
  • PipPipPipPipPipPipPipPipPip
  • 1112 posts
  • Sexo:Não informado
  • Localidade:Divinopolis-MG
  • Interesses:ASP &amp; Design

Posted 11/10/2003, 14:26

<% sqlExcluir = "DELETE * FROM tabela WHERE id IN("&Request("Campo")&")"
SuaConexao.Execute(sqlExcluir) %>

tenta isso ai!

vc tentou com esse ai?

:P :)
naum tinha testado esse naum!
aí eu colokei como "radio" e esse codigo pra deletar e gunfou blz!!!!!

valew guest




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq