fabiosilva1 Postado Fevereiro 24, 2005 Denunciar Share Postado Fevereiro 24, 2005 to com esse codigo e tá dando erro na linha 180 por favor quem puder analisar e me dar um toque agradeço demais<%'conexão bd de noticias'%><!--#include file="config.asp" --><%'conexão bd de eventos'%><!--#include file="evconfig.asp"--><%'conexao banco de classificados-------------------Set clsCx = Server.CreateObject("ADODB.Connection")Set clsRs = Server.CreateObject("ADODB.Recordset")clsCXpath="DBQ=" & Server.MapPath("class/database/dados.mdb")clsCX.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & clsCxpathWSql = "SELECT i.itemcodigo, f.fabricantedescricao, i.itemdescricao, i.itemcilindrada, i.itemano, i.itemvalor "WSql = WSql & "FROM tbitem i, tbfabricante f "WSql = WSql & "WHERE (i.itemfabricante = f.fabricanteid) "WSql = WSql & "ORDER BY i.itemdata DESC"Set clsRS = clsCx.Execute(WSql)%><script LANGUAGE="JavaScript"><!--function NewWindow(mypage, myname, w, h, scroll) {var winl = (screen.width - w) / 0;var wint = (screen.height - h) / 0;winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'win = window.open(mypage, myname, winprops)if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }}//--></script><style><!--a{text-decoration:none}//--></style><html><head><title>V I A M O T O S - A estrada para o seu sonho</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><BODY bgcolor="#FFcc00" background="imagens/fdo_textura.gif" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><table width="760" height="434" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="5" height="434" background="imagens/barra.gif"><img src="imagens/barra.gif" width="5" height="5"></td> <td width="750" valign="top"> <table width="750" height="434" border="0" align="center" cellpadding="0" cellspacing="0"> <tr align="center" valign="top" bgcolor="#FFFFFF"> <td width="750" height="25" colspan="4"><div id=1> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="36"> <param name="movie" value="imagens/menu1.swf"> <param name="quality" value="high"> <embed src="imagens/menu1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="36"></embed> </object> </div> </td> </tr> <tr> <td height="292" colspan="4" bgcolor="#FFFFFF"><table width="200" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="3"><img src="imagens/idx/img01.jpg" width="608" height="292"></td> <td><img src="imagens/idx/img02.jpg" width="123" height="124"></td> <td rowspan="3"><img src="imagens/idx/img04.jpg" width="19" height="292"></td> </tr> <tr> <td height="59" valign="top" background="imagens/idx/fdo_iframe.jpg"><table width="74" align="center" cellpadding="0" cellspacing="1"> <% sqlstmt = "SELECT * FROM eventos ORDER BY id DESC" Set rs1 = Server.CreateObject("ADODB.Recordset") rs1.Open sqlstmt, Dados, 3, 3TotalRecs1 = rs1.recordcounty = 0For y = 1 to 1 If rs1.eof then Exit For Else date1 = rs1("data") id = rs1("ID") name1 = rs1("titulo") link = "<a href='news/evview.asp?id=" & id & "'>" & date1 & "</a>" description = name1 %> <tr> <td width="1%" valign="top"> <td height="2" valign="top"><div align="center"><strong> <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif" class="home"><span class="home"> <% =link %> </span></font></strong></div> </tr> <tr> <td valign="top"> <td height="2" valign="top"><div align="center"><strong> <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif" class="home"><span class="home"> <% =description%> </span></font></strong></div> </tr> <%rs1.MoveNextEnd IfNext%> </table></td> </tr> <tr> <td><img src="imagens/idx/img03.jpg" width="123" height="109"></td> </tr> </table></td> </tr> <tr bgcolor="#FFFFFF"> <td height="106" colspan="4" valign="top"> <table width="739" height="106" border="0" align="right" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF"> <tr> <td width="146" height="102" valign="top" bgcolor="#FFFFFF"> <table width="140" height="90" border="0" align="center" cellpadding="0" cellspacing="5"> <tr> <td width="129" height="12" bgcolor="#FFFFFF" class="style20"><div align="center"><span class="style20"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Revenda Autorizada:</strong></font></span></div> </td> </tr> <tr> <td height="40" bgcolor="#FFFFFF"><div align="center"><img src="imagens/logo_honda.jpg" width="136" height="34"></div> </td> </tr> <tr> <td height="27" bgcolor="#FFFFFF"> <p align="center"><img src="imagens/logo_cons_honda.jpg" width="123" height="30"> </p> </td> </tr> </table> </td> <td width="2" align="center" valign="top" background="imagens/traco.jpg"> </td> <td width="260" align="center" valign="top"><table width="251" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="251" height="12" bgcolor="#FFFFFF"><div align="center"><span class="style20"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Classificados</strong></font></span></div></td> </tr> <tr> <td height="33"><div align="center"> <table width="248" border="0" cellpadding="0" cellspacing="0" class="style15"> <% WCor = "branco" For i = 1 to 3 If Not clsRS.EOF Then WItem = clsRS("fabricantedescricao").Value & " " & clsRS("itemdescricao").Value & " " & clsRS("itemcilindrada").Value%> <tr bgcolor="<%If WCor = "amarelo" Then WCor = "branco" Response.Write("#FFFFFF") Else WCor = "amarelo" Response.Write("#FFCC66") End if %>"> <td width="120"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="class/abreitem.asp?cod=<%=clsRS("itemcodigo").Value%>" class="style6" onClick="NewWindow(this.href,'name','540','300','no');return false;"><%=WItem%></a></font></td> <td width="36" align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <% =clsRS("itemano").Value %> </font></td> <td width="69" align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <% =FormatNumber(clsRS("itemvalor").Value,2) %> </font></td> </tr> <% clsRS.MoveNext End If Next %> </table> </div> </td> </tr> <tr> <td height="19"><div align="center"><span class="style17"><a href="class/consulta.asp"><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>confira mais ofertas de motos clicando aqui</strong></font></a></span></div> </td> </tr> </table> </td> <td width="11" valign="top" background="imagens/traco.jpg"> </td> <td width="260" valign="top"><table width="250" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Últimas Notícias</font></strong></div> </td> </tr> <tr> <td height="20"> <table width="74" align="center" cellpadding="0" cellspacing="1"> <% sqlstmt = "SELECT * FROM noticias ORDER BY id DESC" Set rs2 = Server.CreateObject("ADODB.Recordset")180 rs2.Open sqlstmt, Dados, 3 , 3 TotalRecs2 = rs2.recordcountx = 0For x = 1 to 3 If rs2.eof then Exit For Else date2 = rs2("data") id2 = rs2("ID") name2 = rs2("titulo") link2 = "<a href='news/view.asp?id=" & id2 & "'>" & date2 & "</a>" description = name2 %> <tr> <td width="1%" valign="top"> <td height="2" valign="top"><div align="center"><strong> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" class="home"><span class="home"> <% =link %> </span></font></strong></div> </tr> <tr> <td valign="top"> <td height="2" valign="top"><div align="center"><strong> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" class="home"><span class="home"> <% =description%> </span></font></strong></div> </tr> <%rs1.MoveNextEnd IfNext%> </table></td> </tr> </table></td> <td width="12" valign="top" background="imagens/traco.jpg"> </td> <td width="38" valign="top"><img src="imagens/ibrain.jpg" width="26" height="100" border="0" usemap="#Map"></td> </tr> </table> </td> </tr> </table> </td> <td width="10" background="imagens/barra_dir.gif"><img src="imagens/barra_dir.gif" width="5" height="5"></td> </tr></table><p> </p><p><map name="Map"> <area shape="rect" coords="1,1,27,100" href="mailto:fabiosilva1@bol.com.br"> </map></p></body></html> Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 edmais Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 Qual é a Linha 180? Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Guest - fabiosilva1 - Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 Qual é a Linha 180? rs2.Open sqlstmt, Dados, 3 , 3é o seguinte uso o mesmo codigo pra fazer duas funções ai nesse script, mas já fiz todas as alterações pra eles não ficarem iguais, ´mas essa linha ai sempre dá o erroMicrosoft OLE DB Provider for ODBC Drivers error '80040e37' [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'noticias'. Make sure it exists and that its name is spelled correctly. /default_nova2.asp, line 180 Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 edmais Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 Recordset.OPEN SQL,CONEXAO,3,3Testa ae! Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Guest - fabiosilva1 - Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 deu esse erro agoraMicrosoft VBScript runtime error '800a01a8' Object required: '' /default_nova3.asp, line 180 Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 edmais Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 Cola aí como ficou o seu código Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Guest - fabiosilva1 - Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 <% sqlstmt = "SELECT * FROM noticias ORDER BY data, id DESC" Set rs2 = Server.CreateObject("ADODB.Recordset") Recordset.OPEN SQL,CONEXAO,3,3TotalRecs2 = rs2.recordcountx = 0For x = 1 to 3 If rs2.eof then Exit For Else date2 = rs2("data") id2 = rs2("ID") name2 = rs2("titulo") link2 = "<a href='news/view.asp?id=" & id2 & "'>" & date2 & "</a>" description = name2 %> Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 edmais Postado Fevereiro 25, 2005 Denunciar Share Postado Fevereiro 25, 2005 - fabiosilva1 - Postado em Feb 24 2005, 11:14 PM <% sqlstmt = "SELECT * FROM noticias ORDER BY data, id DESC"Set rs2 = Server.CreateObject("ADODB.Recordset")Recordset.OPEN SQL,CONEXAO,3,3TotalRecs2 = rs2.recordcountx = 0For x = 1 to 3If rs2.eof thenExit ForElsedate2 = rs2("data")id2 = rs2("ID")name2 = rs2("titulo")link2 = "<a href='news/view.asp?id=" & id2 & "'>" & date2 & "</a>"description = name2%> Brother,Quando falei com que você usasse:Recordset.OPEN SQL,CONEXAO,3,3Era para que você substituisse o que passei, para o nome dos quais você está usando.Então na linha que te passei, onde está Recordset, você substiuipara o nome do Recordset que você setou, que é rs2, e aí por diante, entendeu? Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
fabiosilva1
to com esse codigo e tá dando erro na linha 180 por favor quem puder analisar e me dar um toque agradeço demais
<%'conexão bd de noticias'%>
<!--#include file="config.asp" -->
<%'conexão bd de eventos'%>
<!--#include file="evconfig.asp"-->
<%
'conexao banco de classificados-------------------
Set clsCx = Server.CreateObject("ADODB.Connection")
Set clsRs = Server.CreateObject("ADODB.Recordset")
clsCXpath="DBQ=" & Server.MapPath("class/database/dados.mdb")
clsCX.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & clsCxpath
WSql = "SELECT i.itemcodigo, f.fabricantedescricao, i.itemdescricao, i.itemcilindrada, i.itemano, i.itemvalor "
WSql = WSql & "FROM tbitem i, tbfabricante f "
WSql = WSql & "WHERE (i.itemfabricante = f.fabricanteid) "
WSql = WSql & "ORDER BY i.itemdata DESC"
Set clsRS = clsCx.Execute(WSql)
%>
<script LANGUAGE="JavaScript">
<!--
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 0;
var wint = (screen.height - h) / 0;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//-->
</script>
<style>
<!--
a{text-decoration:none}
//-->
</style>
<html>
<head>
<title>V I A M O T O S - A estrada para o seu sonho</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<BODY bgcolor="#FFcc00" background="imagens/fdo_textura.gif" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="760" height="434" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" height="434" background="imagens/barra.gif"><img src="imagens/barra.gif" width="5" height="5"></td>
<td width="750" valign="top">
<table width="750" height="434" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" valign="top" bgcolor="#FFFFFF">
<td width="750" height="25" colspan="4"><div id=1>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="36">
<param name="movie" value="imagens/menu1.swf">
<param name="quality" value="high">
<embed src="imagens/menu1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="36"></embed>
</object>
</div>
</td>
</tr>
<tr>
<td height="292" colspan="4" bgcolor="#FFFFFF"><table width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="3"><img src="imagens/idx/img01.jpg" width="608" height="292"></td>
<td><img src="imagens/idx/img02.jpg" width="123" height="124"></td>
<td rowspan="3"><img src="imagens/idx/img04.jpg" width="19" height="292"></td>
</tr>
<tr>
<td height="59" valign="top" background="imagens/idx/fdo_iframe.jpg"><table width="74" align="center" cellpadding="0" cellspacing="1">
<% sqlstmt = "SELECT * FROM eventos ORDER BY id DESC"
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open sqlstmt, Dados, 3, 3
TotalRecs1 = rs1.recordcount
y = 0
For y = 1 to 1
If rs1.eof then
Exit For
Else
date1 = rs1("data")
id = rs1("ID")
name1 = rs1("titulo")
link = "<a href='news/evview.asp?id=" & id & "'>" & date1 & "</a>"
description = name1
%>
<tr>
<td width="1%" valign="top">
<td height="2" valign="top"><div align="center"><strong> <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif" class="home"><span class="home">
<% =link %>
</span></font></strong></div>
</tr>
<tr>
<td valign="top">
<td height="2" valign="top"><div align="center"><strong> <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif" class="home"><span class="home">
<% =description%>
</span></font></strong></div>
</tr>
<%
rs1.MoveNext
End If
Next%>
</table></td>
</tr>
<tr>
<td><img src="imagens/idx/img03.jpg" width="123" height="109"></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="106" colspan="4" valign="top">
<table width="739" height="106" border="0" align="right" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td width="146" height="102" valign="top" bgcolor="#FFFFFF">
<table width="140" height="90" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td width="129" height="12" bgcolor="#FFFFFF" class="style20"><div align="center"><span class="style20"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Revenda
Autorizada:</strong></font></span></div>
</td>
</tr>
<tr>
<td height="40" bgcolor="#FFFFFF"><div align="center"><img src="imagens/logo_honda.jpg" width="136" height="34"></div>
</td>
</tr>
<tr>
<td height="27" bgcolor="#FFFFFF">
<p align="center"><img src="imagens/logo_cons_honda.jpg" width="123" height="30"> </p>
</td>
</tr>
</table>
</td>
<td width="2" align="center" valign="top" background="imagens/traco.jpg"> </td>
<td width="260" align="center" valign="top"><table width="251" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="251" height="12" bgcolor="#FFFFFF"><div align="center"><span class="style20"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Classificados</strong></font></span></div></td>
</tr>
<tr>
<td height="33"><div align="center">
<table width="248" border="0" cellpadding="0" cellspacing="0" class="style15">
<% WCor = "branco"
For i = 1 to 3
If Not clsRS.EOF Then
WItem = clsRS("fabricantedescricao").Value & " " & clsRS("itemdescricao").Value & " " & clsRS("itemcilindrada").Value%>
<tr bgcolor="<%If WCor = "amarelo" Then
WCor = "branco"
Response.Write("#FFFFFF")
Else
WCor = "amarelo"
Response.Write("#FFCC66")
End if %>">
<td width="120"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="class/abreitem.asp?cod=<%=clsRS("itemcodigo").Value%>" class="style6" onClick="NewWindow(this.href,'name','540','300','no');return false;"><%=WItem%></a></font></td>
<td width="36" align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =clsRS("itemano").Value %>
</font></td>
<td width="69" align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =FormatNumber(clsRS("itemvalor").Value,2) %>
</font></td>
</tr>
<% clsRS.MoveNext
End If
Next %>
</table>
</div>
</td>
</tr>
<tr>
<td height="19"><div align="center"><span class="style17"><a href="class/consulta.asp"><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>confira
mais ofertas de motos clicando aqui</strong></font></a></span></div>
</td>
</tr>
</table>
</td>
<td width="11" valign="top" background="imagens/traco.jpg"> </td>
<td width="260" valign="top"><table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Últimas Notícias</font></strong></div>
</td>
</tr>
<tr>
<td height="20"> <table width="74" align="center" cellpadding="0" cellspacing="1">
<% sqlstmt = "SELECT * FROM noticias ORDER BY id DESC"
Set rs2 = Server.CreateObject("ADODB.Recordset")
180 rs2.Open sqlstmt, Dados, 3 , 3
TotalRecs2 = rs2.recordcount
x = 0
For x = 1 to 3
If rs2.eof then
Exit For
Else
date2 = rs2("data")
id2 = rs2("ID")
name2 = rs2("titulo")
link2 = "<a href='news/view.asp?id=" & id2 & "'>" & date2 & "</a>"
description = name2
%>
<tr>
<td width="1%" valign="top">
<td height="2" valign="top"><div align="center"><strong> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" class="home"><span class="home">
<% =link %>
</span></font></strong></div>
</tr>
<tr>
<td valign="top">
<td height="2" valign="top"><div align="center"><strong> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" class="home"><span class="home">
<% =description%>
</span></font></strong></div>
</tr>
<%
rs1.MoveNext
End If
Next%>
</table></td>
</tr>
</table></td>
<td width="12" valign="top" background="imagens/traco.jpg"> </td>
<td width="38" valign="top"><img src="imagens/ibrain.jpg" width="26" height="100" border="0" usemap="#Map"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="10" background="imagens/barra_dir.gif"><img src="imagens/barra_dir.gif" width="5" height="5"></td>
</tr>
</table>
<p> </p>
<p><map name="Map">
<area shape="rect" coords="1,1,27,100" href="mailto:fabiosilva1@bol.com.br">
</map>
</p>
</body>
</html>
Link para o comentário
Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.