9 messaggi dal 23 luglio 2002
Ciao a tutti, ho bisogno di un aiuto.
Premetto che ho letto tutti i post riguardo l'impaginazione, ma sono CIORDA e non riesco a capire.

a questo indirizzo:
http://www.aspitalia.com/liste/usag/script.aspx?ID=208
http://www.aspitalia.com/liste/usag/script.aspx?ID=268

ci sono due esempi per l'impaginazione.
io ho un file (che posto) poi dove raccolgo dati su piccole società di calcio, ho provato in vari modi a inserire il codice per fare + pagine ma mi da sempre errore.
dove lo devo inserire?

qui c'è la pagina:
http://www.eurohockey.org/clubs/clubs.asp


e questo è il file.
<%@ Language="vbscript"%>
<% Session.LCID=1040
Set Conn = server.CreateObject("adodb.connection")

' DSNless connesione al Database
Dim DSNtemp
DSNtemp="Provider=MSDASQL;"
DSNtemp=DSNtemp & "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=DSNtemp & "DBQ=D:\inetpub\webs\eurohockeyorg\mdb-database\clubs.mdb;"

Conn.open DSNtemp
%>
<html>

<head>
<title>ASP</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type=text/css>

A {text-decoration: none}
A:hover {background-color: black; color: yellow}
</style>
<STYLE>
BODY { font-family:verdana, arial }
</STYLE>
</head>

<body link="#000080" vlink="#FF0000" alink="#008000">

<center>
<h2><font color="#000000">Società</font></h2>
</center>
<hr size="1" color="#0000FF">
<font size="1">
Order by: Società - <A HREF="clubs_citta.asp">Città</A> -
<A HREF="clubs_home.asp">Home page</A> -
<A HREF="clubs_camp.asp">Campionato</A></font>
<hr size="1" color="#0000FF">
<%
'---------------------------------------------------------------------------
' Il SQL sotto seleziona tutti i record del database clubs.
'---------------------------------------------------------------------------
msql ="SELECT * FROM [clubs] ORDER BY societa asc"
Set RS=Conn.Execute(msql)
%>


<table border="0" cellpadding="1" cellspacing="2" align="left">
<% Do While Not RS.EOF %>
<tr>
<td colspan="2"><hr size="1" width="100%" color="red"></td></tr><tr>
<td bgcolor="#FF9933" ><b><font face="verdana" size="1">Società</font></b></td>
<% response.write "<td bgcolor=""#C0C0C0""><font face=""verdana""><font size=""1"">" & rs("societa")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Campionato</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("campionato")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">C/o</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("co")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Indirizzo</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("indirizzo")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">CAP</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("cap")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Città/Provincia</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("citta")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Tel</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("tel")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Fax</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("fax")& "</font></font></td>" %>
</tr>
<tr>



<td bgcolor="#FF9933"><b><font face="verdana" size="1">Official Web Page</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1""><a href=""" & rs("homepage") & """>" & rs("homepage") & "</a></font></font></td>" %></tr>







<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Email riferimento</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1""><a href=""mailto:" & rs("email") & """>" & Rs("email") & "</a></font></font></td>" %>

</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Campo</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("campo")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Indirizzo</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("indirizzoc")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Tel</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("telc")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Fax</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("faxc")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Città/Provincia</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("cittac")& "</font></font></td>" %>
</tr>
<tr>
<td bgcolor="#FF9933"><b><font face="verdana" size="1">Varie</font></b></td>
<% response.write "<td><font face=""verdana""><font size=""1"">" & rs("varie")& "</font></font></td>" %>
</tr>

<%
RS.MoveNext
Loop%>
</table>
<%
RS.Close
Conn.Close
Set RS = Nothing
%>

</body>

</html>

grazie dell'aiuto

Guada questo topic
http://forum.aspitalia.com/forum/topic.asp?TOPIC_ID=12848
può esserti d'aiuto soprattutto per capire in che posizione mettere il codice nella pagina.
Ciao


Alberto Biancardo
9 messaggi dal 23 luglio 2002
ho provato ma mi da questo errore,


Microsoft VBScript runtime error '800a01a8'

Object required: 'rs'

/clubs/clubs.asp, line 21


2.907 messaggi dal 15 maggio 2001
Contributi
Devi utilizzare il nome con cui hai aperto il recordset

esempio :

Set <b>leggi</b>=nome_connessione.Execute("select*from tabella")

Response.write <b>leggi</b>("nome_campo")

oppure

Set <b>rs</b>=nome_connessione.Execute("select*from tabella")

Response.write <b>rs</b>("nome_campo")

<font size=3><u>-¦»Rome Webmaster«¦-</u></font id=size3>
9 messaggi dal 23 luglio 2002
riposto il codice, mi sa che non ci capisco proprio una mazza!!!!


&lt;%@ Language="vbscript"%&gt;
&lt;% Session.LCID=1040
Set Conn = server.CreateObject("adodb.connection")

' DSNless connesione al Database
Dim DSNtemp
DSNtemp="Provider=MSDASQL;"
DSNtemp=DSNtemp & "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=DSNtemp & "DBQ=D:\inetpub\webs\eurohockeyorg\mdb-database\clubs.mdb;"

Conn.open DSNtemp
%&gt;

&lt;%
RecordsPerPagina = 5
page = Request("page")
if page="" then page=1
strRicerca = Request("societa")
SQL = "SELECT * FROM clubs WHERE Descrizione LIKE '%" & strRicerca & "%'"
rs.open sql, conn, 1, 3
rs.PageSize = RecordsPerPagina
rs.AbsolutePage = page
%&gt;


&lt;html&gt;

&lt;head&gt;
&lt;title&gt;ASP&lt;/title&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;style type=text/css&gt;

A {text-decoration: none}
A:hover {background-color: black; color: yellow}
&lt;/style&gt;
&lt;STYLE&gt;
BODY { font-family:verdana, arial }
&lt;/STYLE&gt;
&lt;/head&gt;

&lt;body link="#000080" vlink="#FF0000" alink="#008000"&gt;

&lt;center&gt;
&lt;h2&gt;&lt;font color="#000000"&gt;Società&lt;/font&gt;&lt;/h2&gt;
&lt;/center&gt;
&lt;hr size="1" color="#0000FF"&gt;
&lt;font size="1"&gt;
Order by: Società - &lt;A HREF="clubs_citta.asp"&gt;Città&lt;/A&gt; -
&lt;A HREF="clubs_home.asp"&gt;Home page&lt;/A&gt; -
&lt;A HREF="clubs_camp.asp"&gt;Campionato&lt;/A&gt;&lt;/font&gt;
&lt;hr size="1" color="#0000FF"&gt;
&lt;%
'---------------------------------------------------------------------------
' Il SQL sotto seleziona tutti i record del database clubs.
'---------------------------------------------------------------------------
msql ="SELECT * FROM [clubs] ORDER BY societa asc"
Set RS=Conn.Execute(msql)
%&gt;

&lt;% If rs.Eof=True or rs.Bof=True then
Response.Write "&lt;P&gt;Nessun risultato trovato&lt;/P&gt;"
Else
For i=1 to RecordsPerPagina
if Not rs.EOF then
' qui fai vedere i risultati della paginazione
rs.MoveNext
end if
Next
End if
Response.Write "&lt;P&gt;&lt;B&gt;Pagine:&lt;/B&gt; "
For pag=1 to rs.PageCount
Response.Write "&lt;A href='clubs.asp?page=" & pag
Response.Write "&ricerca=" & Server.UrlEncode(strRicerca)
Response.write "'&gt;"
Response.Write pag
Response.Write "&lt;/A&gt; "
Next
Response.Write "&lt;/P&gt;"
%&gt;


&lt;table border="0" cellpadding="1" cellspacing="2" align="left"&gt;
&lt;% Do While Not RS.EOF %&gt;

&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;hr size="1" width="100%" color="red"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;
&lt;td bgcolor="#FF9933" &gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Società&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td bgcolor=""#C0C0C0""&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("societa")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Campionato&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("campionato")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;C/o&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("co")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Indirizzo&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("indirizzo")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;CAP&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("cap")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Città/Provincia&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("citta")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Tel&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("tel")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Fax&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("fax")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;



&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Official Web Page&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;&lt;a href=""" & rs("homepage") & """&gt;" & rs("homepage") & "&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;&lt;/tr&gt;







&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Email riferimento&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;&lt;a href=""mailto:" & rs("email") & """&gt;" & Rs("email") & "&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Campo&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("campo")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Indirizzo&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("indirizzoc")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Tel&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("telc")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Fax&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("faxc")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Città/Provincia&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("cittac")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="#FF9933"&gt;&lt;b&gt;&lt;font face="verdana" size="1"&gt;Varie&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;% response.write "&lt;td&gt;&lt;font face=""verdana""&gt;&lt;font size=""1""&gt;" & rs("varie")& "&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;" %&gt;
&lt;/tr&gt;

&lt;%
RS.MoveNext
Loop%&gt;
&lt;/table&gt;
&lt;%
RS.Close
Conn.Close
Set RS = Nothing
%&gt;

&lt;/body&gt;

&lt;/html&gt;


Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.