Erro no conexao.execute(sql)
<html> <LINK REL="stylesheet" HREF="\heva.css" TYPE="text/css"> <!--#include file="..\connect.asp"--> <style> td{font-weight:bold;font-size:12pt} h4{font-weight:bold} strong{font-weight:bold;color:firebrick;font-size:12pt}</style> <%varhrabe = Request.form ("horaabe")varusuario = Request.form ("usuario")varestacao = Request.form ("estacao")vardescricao = Request.form ("Descricao")set area_bd = Conexao.execute(" SELECT estacaoid,areaid,ativo FROM computador WHERE estacaoid = "&varestacao&" AND ativo = 1")vararea = area_bd("areaid")sql = "insert into principal(horaabe,usuarioid,estacaoid,areaid,descricao)"sql = sql & " Values ("sql = sql & "'"&varhrabe&"', "sql = sql & "'"&varusuario&"', "sql = sql & "'"&varestacao&"', "sql = sql & "'"&vararea&"', "sql = sql & "'"&vardescricao&"')"set bd = Conexao.execute(sql) -----------essa é a linha onde aparece o erro.'Response.Write(sql)'Response.End'Response.Redirect("confirma.htm")set bdc = Conexao.execute("SELECT numero,dataabe,horaabe,descricao FROM chamados ORDER BY numero DESC")%> <body style="overflow:hidden;"> <br> <h2 align="center">Seu Chamado foi aberto com sucesso !!</h2> <br> <br> <h4 align="center"><u>DADOS DO CHAMADO</u></h4> <table align="center" border="0" width="80%"> <tr> <td height="60">Número: <strong><%=bdc("numero")%></strong></td> <td>Data: <strong><%=bdc("dataabe")%></strong></td> <td>Hora: <strong><%=bdc("horaabe")%></strong></td> </tr> <tr> <td colspan="3" height="60">Descrição: <strong><%=bdc("descricao")%></strong></td> </tr> </table> <p align="right"><a href="/suporte/index.htm"><b>Voltar</b></a></p> <%Conexao.closeSet bdc = NothingSet Conexao = NothingSet bd = NothingSet Conexao = NothingSet area_bd = NothingSet Conexao = Nothing%> </body></html>
----Esse é o erro-----
insert into principal(horaabe,usuarioid,estacaoid,areaid,descricao) Values ('12:06:57', 744, gsi08, 233, Teste)
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/suporte/form.asp, line 26
Porém pelo que dei uma lida dizem que esse erro é devido ao nome do código estar diferente do nome do banco de dados, mas está tudo certinho.. Será que alguém pode me ajudar?
Grata
Ana
Discussão (42)
Carregando comentários...