<!-- #INCLUDE FILE="inc.asp" -->
<!-- #INCLUDE FILE="AdminINC.asp" -->
<head>
<title></title>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF" text="#211852" link="#211852" vlink="#211852" alink="#211852">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" bgcolor="#9CCEFF" align="center">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open dsn
mySQL1 = "SELECT * from Festa where FestaID = " & request.querystring("FestaID") & ""
set rs = conn.execute(mysql1)
%><b><%= rs("Festa") %></b><br><%= ors("Data") %>
</td>
</tr>
</table>
<%
FestaID = request.querystring("FestaID")
Set Myconn = Server.CreateObject("ADODB.Connection")
Myconn.Open DB_CONNECTIONSTRING
SET MYTABLE= SERVER.CREATEOBJECT("ADODB.RECORDSET")
mySQL = "select * from Fotos WHERE FestaID = " & request.querystring("FestaID") & ""
iPageSize = AdminRS.fields("NoResults")
If Request.QueryString("pagina") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("pagina"))
End If
mytable.PageSize = iPageSize
mytable.CacheSize = iPageSize
mytable.open mysql,myconn,3,3
iPageCount = mytable.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
mytable.AbsolutePage = iPageCurrent
For I = 0 To mytable.Fields.Count - 1
Next
iRecordsShown = 0
Do While iRecordsShown < iPageSize And Not mytable.EOF
%>
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#DEE7F7"><a href="bigpicture.asp?id=<%= mytable.fields("id").value %>"><img src="Fotos/<%= mytable.fields("Foto") %>.jpg" width="120" height="90" border="0"></a></td>
</tr>
<tr>
<td height=10 align="center">----------------</td>
</tr>
</table>
</center>
</div>
<%
iRecordsShown = iRecordsShown + 1
mytable.MoveNext
Loop
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="33%" bgcolor="#9CCEFF">
<p align="center"><font color="#211852" face="Arial"><%If iPageCurrent > 1 Then
%>
<a href="ShowCat.asp?FestaID=<%= FestaID %>&pagina=<%= iPageCurrent - 1 %>"><<
Previous</a><%
End If %></font></p>
</td>
<td width="33%" bgcolor="#9CCEFF">
<p align="center"><font color="#211852" face="Arial"><%
' You can also show page numbers:
For I = 1 To iPageCount
If I = iPageCurrent Then
%>
<%= I %>
<%
Else
%>
<a href="ShowCat.asp?FestaID=<%= FestaID %>&pagina=<%= I %>"><%= I %></a>
<%
End If
Next 'I %>
</font>
</td>
<td width="34%" bgcolor="#9CCEFF">
<p align="center"><font color="#211852" face="Arial"><% 'next button
If iPageCurrent < iPageCount Then
%>
<a href="ShowCat.asp?FestaID=<%= FestaID %>&pagina=<%= iPageCurrent + 1 %>">Next >></a>
<%
End If %></font></p>
</td>
</tr>
</table>
<%
AdminRS.close
%>
Banco De Dados
#16
Posted 18/09/2003, 10:33
#17
Posted 18/09/2003, 10:40
Agora ta dando esse erro:
Tipo de erro:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Nome da fonte de dados não encontrado e nenhum driver padrão especificado
/Testes/Galeria/Minha galeria/menu2.asp, line 12
E agora?
Abraços!
#18
Posted 18/09/2003, 10:52
#19
Posted 19/09/2003, 11:21
Essa linha aí ainda tá me deixando na duvida...Tipo de erro:
Microsoft JET Database Engine (0x80040E07)
Tipo de dados imcompatível na expressão de critério.
/Testes/Galeria/Minha galeria/menu.asp, line 37
mytable.open mysql,myconn,3,3E agora?
Abraços!
#20
Posted 22/09/2003, 14:25
#21
Posted 22/09/2003, 14:56
mytable.open mysql,myconn,3,1
Abraços
// Links úteis: Busca || Regras
// Não respondo dúvidas via mensagem privada. Use o fórum para buscar ou perguntar.
#22
Posted 24/09/2003, 14:16
nada... o mesmo erro continua aparecendo...
Abraços!
#23
Posted 24/09/2003, 15:04
nesse codigo, há muita "poluicao" vo explicar ex:
esse adminrs vem de um include? se nao ele nao funcionara pq nao esta definido o que ele é.iPageSize = AdminRS.fields("NoResults")%>
teste usarmytable.open mysql,myconn,3
mytable.open mysql,myconn
para que as propiredades sejam as padroes
ve se vai adiantar ok?
#24
Posted 25/09/2003, 12:02
Não adiantou... O erro continua aparecendo...
d-style,
nesse codigo, há muita "poluicao" vo explicar ex:esse adminrs vem de um include? se nao ele nao funcionara pq nao esta definido o que ele é.iPageSize = AdminRS.fields("NoResults")%>
O AdminRS vem de um include sim...
vc disse q o código está mto poluído... realmente, ele tá meio complicado... como nós poderíamos limpá-lo? pq, sinceramente, eu não sei como fazer isso...
Abraços!
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)










