Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal, dessa vez tenho certeza que será simples para muita gente, esse problema que eu estou agora.
EU NUNCA FIZ uma pagina de ATUALIZAÇÃO e nem usei o FCKeditor, mas graças as pesquisas (Tuto do SilvaExtreme) aqui no fórum o FCKeditor ta funcionando e inserindo beleza, o problema que esta dando é o seguinte:
Tipo de erro:
Erro de tempo de execução do Microsoft VBScript
(0x800A000D)
Tipos incompatíveis
/teste/formulario_atualiza.asp, line 49
Vou postar o que eu tenho e peço a vocês para ver se tem erros no código do "atualiza.asp" pq EU NUNCA FIZ, então foi no escuro.....hehe!
Banco de Dados= teste - TABELA= home - CAMPOS= id, texto
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
formulário_atualiza.asp:
<%@ CodePage="1252" Language="VBScript"%>
<!-- #INCLUDE file="admin/fckeditor.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Atualiza</title>
<style type="text/css"> font-family: Tahoma;
color: #0000FF;
text-decoration: none;
} font-family: Tahoma;
color: #0000FF;
text-decoration: none;
} font-family: Tahoma;
color: #0000FF;
text-decoration: underline;
} font-family: Tahoma;
color: #0000FF;
text-decoration: none;
}</style>
</head>
<body>
<table width="100%" border="1">
<tr>
<td width="26%"><div align="center"><a href="default.asp" target="_top">Ver dados na página</a></div></td>
<td width="26%"> <div align="center"><a href="formulario_inserir.asp">Inserir dados</a></div></td>
<td width="24%"><div align="center"><a href="formulario_atualiza.asp">Atualizar dados</a></div></td>
<td width="24%"> </td>
</tr>
</table>
<br />
<form action="atualiza.asp" method="post" name="txt" id="txt"><input type="submit" value="Atualizar o Banco de Dados" />
</form>
</body>
</html>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------**atualiza.asp:**
<%
'Dados contidos na variável
variavel = request.form("TEXTO")
'Chamando o Objeto ADODB.Connection
set cn = Server.CreateObject("ADODB.Connection")
cn.provider= "Microsoft.Jet.OLEDB.4.0"
cn.connectionstring=Server.MapPath("\dados\teste.mdb")
cn.open
'String para o comando SQL a ser executado
SQL = "UPDATE INTO home (texto) Values ('"&variavel&"')"
cn.execute(sql)
cn.close
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Atualiza Dados</title>
<style type="text/css"> font-family: Tahoma;
color: #0000FF;
text-decoration: none;
} font-family: Tahoma;
color: #0000FF;
text-decoration: none;
} font-family: Tahoma;
color: #0000FF;
text-decoration: underline;
} font-family: Tahoma;
color: #0000FF;
text-decoration: none;
}</style>
</head>
<body>
<table width="100%" border="1">
<tr>
<td width="26%"><div align="center"><a href="default.asp" target="_top">Ver dados na página</a></div></td>
<td width="26%"> <div align="center"><a href="formulario_inserir.asp">Inserir dados</a></div></td>
<td width="24%"><div align="center"><a href="formulario_atualiza.asp">Atualizar dados</a></div></td>
<td width="24%"> </td>
</tr>
</table>
<br />
</body>
</html>Carregando comentários...