Expected end of statement

sara80

Nuovo Utente
21 Mag 2007
24
0
0
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/aspasp/pg/Default.asp, line 68

Response.Write "<td><img src="objRS("Img")" width="110" height="108" border="1"><font color='#000000' face='Verdana' size='1'>" & objRS("Img") & "</font></td>"


Codice:
<%@ Language=VBScript %> 
<% response.buffer=true %>
<% Server.ScriptTimeout = 300 %>
<!-- #include file="adovbs.inc"-->
<!-- #include file="connDb.asp"-->
<html>
<head>
	<title>Creamweb.it - Paginazione</title>
</head>
<BODY MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0" bgcolor="white">
<TABLE WIDTH="500" CELLPADDING="0" CELLSPACING="0" BORDER="0" align="center">
	<TR height="60" valign="middle">
		<TD align="center">
			<font face="verdana" size="3" color="red"><b>Paginazione dei risultati di una query</b></font>
		</TD>
	<TR>
		<TD>	
			<%
			iPageSize = 2 'NUMERO RECORD PER PAGINA

			If Request.QueryString("page") = "" Then
				iPageCurrent = 1
			Else
				iPageCurrent = CInt(Request.QueryString("page"))
			End If

			strSQL = "SELECT * FROM News ORDER BY Titolo ASC"
			Set objRS = Server.CreateObject("ADODB.Recordset")
			objRS.PageSize = iPageSize
			objRS.CacheSize = iPageSize
			objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText

			reccount = objRS.recordcount
			iPageCount = objRS.PageCount

			If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
			If iPageCurrent < 1 Then iPageCurrent = 1

			If iPageCount = 0 Then
				Response.Write "<p><table><td><font face='verdana' size='2' color='#000000'><b>Non sono stati trovati giocatori.</b></td></table></p>"
			Else
				objRS.AbsolutePage = iPageCurrent
				iRecordsShown = 0
				%>
				<table cellpadding="0" cellspacing="0" border="0" width="95%">
					<tr>
						<td bgcolor="#cccccc">
							<table cellpadding="2" cellspacing="1" border="0" width="100%">
								<tr height="22">
									<td bgcolor="#dddddd" WIDTH="6%"><font face="verdana" size="2" color="#000000"><b>N.</b></font></td>
									<td bgcolor="#dddddd" WIDTH="29%"><font face="verdana" size="2" color="#000000"><b>Giocatore</b></font></td>
									<td bgcolor="#dddddd" WIDTH="4%" align="center"><font face="verdana" size="2" color="#000000"><b>Ruolo</b></font></td>
									<td bgcolor="#dddddd" WIDTH="11%" align="center"><font face="verdana" size="2" color="#000000"><b>Squadra</b></font></td>
								</tr>
								<%
								'SI VISUALIZZA IL CONTENUTO DELLA STRINGA SQL
								'ALL'INTERNO DELLA TABELLA PRIMA DEFINITA
								cont=1
								Do While iRecordsShown < iPageSize And Not objRS.EOF
									Dim Rig, bg
									Rig = Rig + 1
									If Rig Mod 2 = 0 then
										bg = "#E4E4E4"
									Else
										bg = "#ccccff"	
									End if	
									Response.Write "<tr bgcolor = " & bg & "><td><font color='#000000' face='Verdana' size='1'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
									Response.Write "<td><img src="objRS("Img")" width="110" height="108" border="1"><font color='#000000' face='Verdana' size='1'>" & objRS("Img") & "</font></td>"
									Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>" & objRS("Titolo") & "</font></td>"
									Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>" & objRS("Testo") & "</font></td>"
									Cont = Cont + 1
									'POSIZIONAMENTO ALLA RIGA SUCCESSIVA DEL DB
									iRecordsShown = iRecordsShown + 1
									objRS.MoveNext
								Loop
								'PULIZIA DEGLI OGGETTI ADO
								objRS.Close
								Set objRS = Nothing
								%>
							</table>
						</td>
					</tr>
				</table>
			<%End if%>
			<p>
			<%If ipagecount <> 1 Then%>
				<center>
				<table>
					<tr valign="middle">
						<td width="50%" align="center" valign="middle"><font face="verdana" size="1" color="#000000">
							<b>[
							<%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%>
								 <a href="default.asp?page=1"><img border="0" src="images/first.gif" valign="middle" alt="Prima"></a> 
							<%end if%>
							<%if iPageCurrent > 1 then%>
								 <a href="default.asp?page=<%=iPageCurrent-1%>"><img border="0" src="images/pre.gif" valign="middle" alt="Precedente"></a> 
							<%end if%>
							<%if iPageCount > 2 then
								if iPageCurrent-2 < 1 then da_pag = 1 else da_pag = iPageCurrent-2
								if iPageCurrent+2 > iPageCount then fino_a_pag = iPageCount else fino_a_pag = iPageCurrent+2
							else
								da_pag = 1
								fino_a_pag = iPageCount
							end if%>
							<%for i = da_pag to fino_a_pag%>
								<%if i = iPageCurrent then%>
									 <font color="red"><%=i%></font> 
								<%else%>	
									 <a href="default.asp?page=<%=i%>"><%=i%></a> 
								<%end if%>	
							<%next%>
							<%if iPageCurrent > 0 and iPageCurrent < iPageCount then%>
								 <a href="default.asp?page=<%=iPageCurrent+1%>"><img border="0" src="images/next.gif" valign="middle" alt="Successiva"></a> 
							<%end if%>	
							<%if iPageCurrent+1 < iPageCount then%>
								 <a href="default.asp?page=<%=iPageCount%>"><img border="0" src="images/last.gif" valign="middle" alt="Ultima"></a> 
							<%end if%>	
							]</b>
						</font></td>
					</tr>
					<tr>
						<td colspan="2" align="center"><font face="verdana" size="1" color="#000000">
							<center>
							Pagina 
								<font color="#FF0000"><b><%=iPageCurrent%></b></font>
								 di 
								<font color="#FF0000"><b><%=iPageCount%></b></font>
							</center>
						</font></td>
					</tr>
				</table>
				</center>
			<%end if%>
			<%
			objConn.Close
			Set objConn = Nothing
			%>
		</TD>
	</TR>
</TABLE>		
</body>
</html>


nel db il percorso della foto lo devo inserire così: news_immagine_1.jpg nel campo "Img" ??

senza inserire <img src="objRS("Img")" width="110" height="108" border="1"> funziona come vedete al link: http://www10.asphost4free.com/aspasp/pg/

nella colonna giocatore, al posto di news_immagine_1.jpg vorrei poter vedere una foto cliccabile..come si fa?

ho provato ma non riesco..

grazie:confused:
 

PoLe

MRW Moderator
6 Giu 2005
2.198
3
0
40
.: Venezia :.
www.bzconsulting.it
....Response.Write "<td><img src="objRS("Img")" width="110" height="108" border="1"><font color='#000000' face='Verdana' size='1'>" & objRS("Img") & "</font></td>"
Ciao :)

Le parti in blu ti mostrano come correggere l'errore ;)

Response.Write "<td><img src='" & objRS("Img") & "' width="110" height="108" border="1"><font color='#000000' face='Verdana' size='1'>" & objRS("Img") & "</font></td>"

:byebye:
 
Discussioni simili
Autore Titolo Forum Risposte Data
M Premature end of script headers PHP 1
L Front-end SQL server Database 0
C [a pagamento] - Cercasi sviluppatore web front-end per assunzione Offerte e Richieste di Lavoro e/o Collaborazione 0
R [WordPress] Inserire campi aggiuntivi ad un Submit Form già dato dal template (front-end) WordPress 0
F [Gratuito][Cerco]Front End pagina web dinamica dinamica stato attuale Offerte e Richieste di Lavoro e/o Collaborazione 1
D Ente di Formazione accreditato in Regione Lazio ricerca Front End Developer Offerte e Richieste di Lavoro e/o Collaborazione 3
P Cerchiamo programmatore back-end per sito web Offerte e Richieste di Lavoro e/o Collaborazione 0
J Cerco front end con esperienza Offerte e Richieste di Lavoro e/o Collaborazione 1
bubino8 Errore Back-end PrestaShop CMS (Content Management System) 1
elpirata [CERCO][GRATUITO] Cercasi Web Designer per realizzazione front end gestionale Offerte e Richieste di Lavoro e/o Collaborazione 3
S [Retribuito] Front End Developer a Milano Offerte e Richieste di Lavoro e/o Collaborazione 0
MaurizioB [OFFRO] [RETRIBUITO] Front-end Web Developer Offerte e Richieste di Lavoro e/o Collaborazione 0
S Mi serve una Web App, da cosa inizio? Framework back end e front end? PHP 4
A [Lavoro, Retribuito] Front - End Developer Offerte e Richieste di Lavoro e/o Collaborazione 0
baobabdesign Cerco collaboratore back-end Offerte e Richieste di Lavoro e/o Collaborazione 8
Open2bSoftware Ricerca di Sviluppatore Front End Offerte e Richieste di Lavoro e/o Collaborazione 0
K Parse error: syntax error, unexpected $end PHP 2
P [Offro Lavoro] Cerchiamo un front-end developer e uno sviluppatore web. Offerte e Richieste di Lavoro e/o Collaborazione 0
andreas88 realizzare lato back-end HTML e CSS 3
C parte back end PHP 1
R Back-end: modifica dati mysql da form php PHP 5
Nik Comando If.. Then.. End If ecc ecc Classic ASP 2
S Response.Redirect e Response.End in PHP!!!! PHP 3
peppoweb Cosa Fate questo Week-End? Discussioni Varie 2
C [PHP] PDO prepared statement - select query errore PHP 7
M Passare dati in un array da statement mysqli PHP 2
J JavaScript Try and Catch Statement in Advance Javascript 0
G Syntax error in UPDATE statement. (update file) Classic ASP 7
grottafelix Syntax error in UPDATE statement. Classic ASP 5

Discussioni simili