Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Galera estou tentando gerar essa alteração e não estou conseguindo.
é apenas para assinalar um checkbox colocando o valor 1 no campo caneca
e esta aparecendo a seguinte mensagem:
>
Microsoft OLE DB Provider for ODBC Drivers erro '80040e10'
[Microsoft][Driver ODBC para Microsoft Access] Parâmetros insuficientes. Eram esperados 3.
/canecas/altera_dados_caneca.asp, line 38
meu codigo está assim.
popup.asp
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%
Dim objConn, str, ObjRs
str = Server.MapPath("../bd/bd_caneca.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & str & ";"
id_caneca = Request.QueryString("id_caneca")
strQuery = "SELECT * FROM ClientesXCaneca where id_caneca="&id_caneca&""
Set ObjRs = objConn.Execute(strQuery)
%>
<style type="text/css">
<!--
.style1 {font-family: calibri}
.style3 {font-size: 11px}
.style4 {font-family: arial}
-->
</style>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<form name="form" method="get" action="altera_dados_caneca.asp">
<table width="512" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" bgcolor="#eeeeee"><img src="../layout/transp.gif" width="10" height="10"></td>
<td width="502"><table width="502" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="32" bgcolor="#eeeeee" class="style10"><div align="center" class="style4"><span class="style3 texto8"><strong>Ok
?
<input name="check_ok" type="checkbox" id="check_ok" value="1">
</strong></span></div></td>
<td width="41%" rowspan="5" valign="top" class="texto8 style1 style3"><img src="" width="205" height="157"></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="59%" height="30" class="style10"><span class="texto8 style4 style3" style="text-transform:uppercase"><strong>CPF</strong>:
<%Response.write objRS("cpf")%>
</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="30" class="style10 style1 style3" style="text-transform:uppercase"><span class="texto8 style4 style3"><strong>NOME </strong>:
<%Response.write objRS("nome")%>
</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="30" class="style10 style1 style3" style="text-transform:uppercase"><span class="texto8 style4 style3"><strong>E-MAIL :</strong>
<%Response.write objRS("email")%>
</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="30" class="style10 style1 style3" style="text-transform:uppercase"><div align="center">
<input name="Ok" type="submit" id="Ok" value="Ok">
<input type="hidden" name="id_caneca" value="<%=objRS("id_caneca")%>" />
</div></td>
</tr>
</table></td>
</tr>
</table>
</form></body>
</html>
altera_dados_caneca.asp
<%
if session("usr_log_ok")="" Then
Response.Write "Você está Logado no sistema!"
Response.write "<a href='../admmor/'>Clique aqui para se logar.</a>"
Session("pagina_restrita") = Request.ServerVariables("SCRIPT_NAME")&"?"&request.ServerVariables("QUERY_STRING")
Response.End()set conexao = Server.CreateObject("ADODB.Connection")
conexao.provider= "Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("..\bd\meu_banco.mdb")&";"
conexao.open
SQL = "select * from usuarios where id_usuario ="&session("usr_log_ok")
Set RS = Conexao.Execute(SQL)
If rs.eof then
Response.write "Ocorreu um Erro!"
Else
%>
<!--#include file="cn.asp"-->
<%
'Declaração das variáveis
Dim objConn, strQuery, sql_query, RsQuery, campo, sql,check_ok
Dim ObjRs, nome_usuario, login_usuario, email_usuario, ativo, id_usuario
'Atrubuição dos valores as respectivas variáveis
check_ok = Request.QueryString("check_ok")
id_caneca = Request.QueryString("id_caneca")
emitente = rs("nome_usuario")
sdata = date
hora = time
SQL="UPDATE ClientesXCaneca SET caneca='"&check_ok&"', loja='"&emitente&"', data='"&sdata&"', hora='"&hora&"' where id_caneca="&id_caneca
'response.Write(sql)
'response.End()
set objRS = cn.execute(SQL)
%>
<%end if%>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<span class="TITULO"><p align="center">REGISTRO EFETUADO COM SUCESSO ! </p></span>
<input type=button value="FECHAR" onClick="javascript:window.close();">
Não sei o que esta dando de errado
Valew pela força galera.
Carregando comentários...