��<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=unicode" http-equiv=Content-Type> <META content="MSHTML 5.00.2614.3500" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>&lt;%@ Language=VBScript %&gt;<BR>&lt;%Response.Buffer = false%&gt;<BR>&lt;HTML&gt;<BR>&lt;HEAD&gt;<BR>&lt;TITLE&gt;Pesquisa de Produtos !!!&lt;/title&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;h2&gt;<BR>&lt;font color=navy&gt;Resultado para a Pesquisa.&lt;/font&gt;<BR>&lt;/h2&gt;<BR>&lt;P&gt;<BR>&lt;font color=navy&gt;<BR>&lt;B&gt;PESQUISA DE PRODUTOS.&lt;/b&gt;<BR>&lt;/font&gt;<BR>&lt;/p&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&lt;form action="produto.asp" method=post name=form1&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&lt;p&gt;<BR>&lt;font color="#000080"&gt;<BR>&lt;b&gt;Digite o C�digo (de 1 a 77): &lt;input name=codigo size=5 maxlength=2&gt;&lt;/b&gt;<BR>&lt;/font&gt;<BR>&lt;/p&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&lt;P&gt;&lt;b&gt;&lt;font color=#000080&gt;<BR>&lt;input name=pesquisar type=submit value="Clique aqui para pesquisar o produto !!"&gt;<BR>&lt;/font&gt;<BR>&lt;/b&gt;<BR>&lt;/p&gt;<BR>&lt;/form&gt;<BR>&lt;%<BR>Dim codigo, conexao, produto, sql_inst<BR>codigo=request.form ("codigo")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2>set conexao=server.CreateObject ("ADODB.Connection")<BR>&nbsp;conexao.Open "nwind"<BR>&nbsp;<BR>sqlbuscaproduto ="SELECT * FROM Produtos WHERE CodigoDoProduto=codigo"</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2>set Produto = Server.CreateObject ("ADODB.Recordset")<BR>&nbsp;Produto.Open sqlbuscaproduto, conexao, 3, 3<BR>%&gt;<BR>&lt;HR&gt;<BR>&lt;%<BR>if Produtos.RecordCount = 0 then<BR>&nbsp;Response.Write "Nenhum produto foi encontrado para o c�digo: "<BR>&nbsp;Response.Write Request.Form ("codigo") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "Tente Pesquisar um outro c�digo!"<BR>&nbsp;Response.Write "&lt;HR&gt;"<BR>else<BR>&nbsp;Response.Write "&lt;B&gt;DADOS DO PRODUTO&lt;/B&gt;&lt;BR&gt;"<BR>&nbsp;Response.Write "C�digo: " &amp; Produto.Fields ("CodigoDoProduto") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "Nome: " &amp; Produto.Fields ("NomeDoProduto") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "C�d. Fornec.: " &amp; Produto.Fields ("CodigoDoFornecedor") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "C�d. Categ.: " &amp; Produto.Fields ("CodigoDaCategoria") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "Pre�o Unit.: " &amp; Produto.Fields ("PrecoUnitario") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "Estoque: " &amp; Produto.Fields ("UnidadesEmEstoque") &amp; "&lt;BR&gt;"<BR>&nbsp;Response.Write "&lt;HR&gt;"<BR>end if<BR>%&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT color=#008000><FONT face=Arial size=2>'<EM>ONDE EST� O ERRO NESTA INSTRU��O?</EM></FONT></FONT></DIV> <DIV><FONT color=#008000 face=Arial size=2><EM>'ELE INDICA O SEGUINTE ERRO!</EM></FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Arial size=2><FONT face=Arial size=2>&nbsp;Microsoft OLE DB Provider for ODBC Drivers</FONT> <FONT face=Arial size=2>error '80040e10'</FONT> <P><FONT face=Arial size=2>[Microsoft][Driver ODBC para Microsoft Access] Par�metros insuficientes. Eram esperados 1.</FONT> <P><FONT face=Arial size=2>/Livro-ASP/produto.asp</FONT><FONT face=Arial size=2>, line 41</FONT></P> <P><FONT color=#008000><EM>'EU USO PWS, IIS 4.0!</EM></FONT><FONT color=#008000><EM><BR>'AGRADE�O A ATEN��O DE TODOS</EM></FONT><FONT color=#008000><EM><BR></EM></FONT><FONT color=#008000><EM><BR>'EDUARDO VIEIRA</EM></FONT></P> <P><FONT color=#008000><EM><BR>---<BR>Outgoing mail is certified Virus Free.<BR>Checked by AVG anti-virus system (<A href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01</EM></FONT></P></FONT></DIV></BODY></HTML>

http://www.asp10.net
==========================================
Solu��es simples para problemas complexos
==========================================


clique aqui Grupos.com.br
p�gina do grupo diret�rio de grupos diret�rio de pessoas cancelar assinatura

Responder a