Boa noite pessoal, A uma semana estou quebrando a cabeça pra fazer funcionar o seguinte... Este script abaixo é de uma página que carrega informações do banco para serem mostradas em outra página mas não sei se o problema é no link ou no select da outra página. Se puderem me ajudar agradeço... abaixo seguem os dois codigos... Code Agenda.inc
<br>
<h4>Agenda Escolar</h4>
<br>
<%
pagina = Request.QueryString("p")
if pagina = "" then
pagina = 1
end if
'Seta a variavel pagina como a página em questão na paginação registros = 12
'Seta o número de registros por pagina %>
<table width="140%" border="0" align="center" cellpadding="9" cellspacing="9">
<%
Set Conexao = Server.CreateObject("ADODB.CONNECTION")
Set RSagenda = Server.CreateObject("ADODB.RECORDSET")
Conexao.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0. Data Source=C:\Inetpub\wwwroot\Criança Feliz\banco\loja.mdb. "
Conexao.Open
set RSagenda.ActiveConnection = Conexao
RSagenda.cursortype = 3
RSagenda.pagesize = registros
SQLagenda = "SELECT * FROM categorias_eventos WHERE id ORDER BY id"
RSagenda.Open SQLagenda
%> <%
if RSagenda.EOF then response.write("<font face=Arial size=2><center><b>" & server.HTMLEncode("Sua pesquisa não retornou nenhum resultado") & "</b></center></font>")
else RSagenda.absolutepage = pagina if RSagenda.EOF then
response.write("<font face=Arial size=2 color=red><center><b><br>" & server.HTMLEncode("Não existem mais albuns, clique abaixo e volte ao inicio!") & "</b></center></font><br><br>") fim = 1 end if
'variaveis para lista em colunas - inicio
contador = 0
inicio = 1
final = 0
auxEntra = 0
coluna = 3
'maxlinha = 4
'variaveis para lsita em colunas - final xx = 0 'paginacao
While NOT RSagenda.EOF AND xx < RSagenda.pagesize contador = contador + 1 'lista em colunas xx = xx + 1 'paginacao 'mais sobre a lista em colunas - inicio IF int("0"&coluna) = int("0"&contador) THEN inicio = 0 final = 1 contador = 0 END IF IF (int("0"&inicio) = 1) AND (int("0"&auxEntra) = 0) THEN auxEntra = 1
response.write "<tr>" END IF if RSagenda("nome") <> "" then%> <td bgcolor=blue align=center>
<%if RSagenda("nome") <> "" then%> <a href="detalhe_agenda.asp?cat_id=<%=RSAgenda("nome")%>"><font face=verdana color=white size=2><b><%=RSagenda("nome")%></b></font></a>
<%else%>
<font face=verdana size=1><img border=0 width=100 src='images/sem_foto.jpg'>
<BR><%=server.htmlencode(RSagenda("nome"))%></font> <%end if%> </td>
<%else%>
<td> <center> <font face=verdana size=1><img border=0 width=100 src='images/sem_foto.jpg'> <BR><%=server.htmlencode(RSagenda("nome"))%></font> </center> </td>
<%end if IF int("0"&final) = 1 THEN
response.write "</tr>" inicio = 1 final = 0 auxEntra = 0 END IF 'mais sobre a lista em colunas - final 'response.write "Nº " & xx & " - " & server.HTMLEncode(RSagenda("disp")) & "<br>" RSagenda.MoveNext Wend
end if if fim = "" then anterior = pagina - 1 proxima = pagina + 1
end if Conexao.Close
Set RSagenda = Nothing
%>
</table>
<%
if anterior <> 0 then
end if
%> CODE
detalhe_agenda.inc <%
'declarando objetos
dim sql_agenda, objConn_agenda, rs_agenda, col_agenda, colu_agenda, imagem_agenda, nome_agenda SET objConn_agenda = Server.CreateObject("AdoDB.Connection")
objConn_agenda.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0. DATA SOURCE=C:\Inetpub\wwwroot\Criança Feliz\banco\loja.mdb"
sql_agenda = "SELECT * FROM produtos_eventos WHERE id LIKE cat_id. " Set rs_agenda = objConn_agenda.Execute(sql_agenda) 'numero de colunas
col_agenda=1 if not rs_agenda.eof then ' esta var armazena o numero de colunas colu_agenda=1 'começamos a tabela
response.write "<table align=center><tr><td>" 'iniciamos o loop´
while not rs_agenda.eof %>
<font face="Arial" color="red" size="3"><b><%response.write rs_agenda ("nome")%></a></b></font>
<% 'fazemos a contagem das colunas e se tiver no limite faz outra linha
if colu_agenda=col_agenda then
response.write "</td><tr><td>" 'reinicia contagem
colu_agenda=1 else ' como não alcançou o limite fazemos outra coluna
response.write "</td><td>" 'somamos +1 na variavel colu
colu_agenda=colu_agenda+1 end if 'terminamos o loop
rs_agenda.movenext
wend response.write "</td></tr></table>" end if
rs_agenda.close set rs_agenda=nothing %>