Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15
  1. #1

    errore nel response.write

    cosa c'e di sbagliato?

    codice:
    Microsoft VBScript compilation error '800a0401' 
    
    Expected end of statement 
    
    /public/default_cerca.asp, line 95 
    
    Response.Write "<td> [img] & objRS([/img]</td>"
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  2. #2
    Questa è la tua :

    codice:
    Response.Write "<td> [img] & objRS([/img]</td>"
    questa è quella corretta

    codice:
    Response.Write "<td> [img] & objRS([/img]</td>"
    Se all'interno di una stringa metti delle virgolette le devi sempre duplicare per farle apparire height=""80""

  3. #3
    ok grazie...
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  4. #4
    mi da questo errore:


    codice:
    ADODB.Recordset error '800a0bb9' 
    
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. 
    
    /public/default_cerca.asp, line 42
    questo è il codice:

    codice:
    	Dim strSQL 
    		iPageSize = 20 'NUMERO RECORD PER PAGINA
    
    					If Request.QueryString("page") = "" Then
    						iPageCurrent = 1
    					Else
    						iPageCurrent = CInt(Request.QueryString("page"))
    					End If
    	
    	
    		strSQL = "SELECT * FROM schede WHERE citta LIKE '%" & Request.Form("TypeSearch") & "%' ORDER BY cognome 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 "
    
    <table><td><font  face='verdana' size='3' color='#000000'><center>Non sono stati trovati Curriculum.</td></table></center></p>"
    			Else
    				objRS.AbsolutePage = iPageCurrent
    				iRecordsShown = 0
    				%>
    				..... creo la tabella
    								<%
    								'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='2'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("cognome") & "</font></center></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("nome") & "</font></center></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("email") & "</font></center></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("citta") & "</font></td>" 
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("descrizione") & "</font></td>" 
    									Response.Write "<td> [img] & objRS([/img]</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%>
    			
    
    
    			... continuo il discorso paginazione
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  5. #5

  6. #6
    ecco la parte iniziale della pagina che riguarda la connessione:


    codice:
    <%@ Language=VBScript %> 
    <% response.buffer=true %>
    <% Server.ScriptTimeout = 300 %>
    
    
    
    <html>
    <head>
    	<title></title>
    
    </head>
    <BODY MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0" bgcolor="#C0C0C0">
    <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" align="center">
      <TR height="60" valign="middle">
    		
        <TD align="center" width="816"> <font face="Verdana" size="4" color="#0000FF">schede presenti nel database</font></TD>
    	<TR>
    		<TD width="816">	
    			<%
    			
    			
    		Dim strSQL 
    		iPageSize = 20 'NUMERO RECORD PER PAGINA
    connDb.asp:

    codice:
    <% 
    Dim Conn
    
    Set Conn=Server.CreateObject("ADODB.Connection")
    
    Conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& server.MapPath("/mdb-database/db_utenti.mdb")
    %>
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  7. #7

  8. #8
    la linea 42 è quella in rosso


    codice:
    <%@ Language=VBScript %> 
    <% response.buffer=true %>
    <% Server.ScriptTimeout = 300 %>
    
    
    
    <html>
    <head>
    	<title>Consorzio Didaform - Tel 091/308434 - Fax 091/304050</title>
    
    </head>
    <BODY MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0" >
    <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" align="center">
      <TR height="60" valign="middle">
    		
        <TD align="center" width="816"> <font face="Verdana" size="4">schede presenti nel database</font></TD>
    	<TR>
    		<TD width="816">	
    			<%
    			
    			
    		Dim strSQL 
    		iPageSize = 20 'NUMERO RECORD PER PAGINA
    
    					If Request.QueryString("page") = "" Then
    						iPageCurrent = 1
    					Else
    						iPageCurrent = CInt(Request.QueryString("page"))
    					End If
    	
    	
    		strSQL = "SELECT * FROM schede WHERE citta LIKE '%" & Request.Form("TypeSearch") & "%' ORDER BY cognome 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 "
    
    <table><td><font  face='verdana' size='3' color='#000000'><center>Non sono stati trovati Curriculum.</td></table></center></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="10%"align="center"><font face="verdana" size="1" color="#000000">[b]N°</font></td>									
                    <td bgcolor="#dddddd" WIDTH="25%" align="center"><font face="verdana" size="1" color="#000000">Cognome e Nome </font></td>									
                    <td bgcolor="#dddddd" WIDTH="20%" align="center"><font face="verdana" size="1">email</font></td>									
                    <td bgcolor="#dddddd" WIDTH="15%" align="center"><font size="1" face="verdana">Citta</font></td>									
                    <td bgcolor="#dddddd" WIDTH="40%" align="center"><font face="verdana" size="1">descrizione</font></td>									
                    <td bgcolor="#dddddd" WIDTH="15%"  align="center"><font face="verdana" size="1">foto</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='2'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("cognome") & "</font></center></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("nome") & "</font></center></td>"
    
    									'response.write "<td><font color='#000000' face='Verdana' size='1'><A HREF='http://www.didaform.sicilia.it/area_riservata/curriculum/visualizza_da_elenco.asp?cod_fisc=" 
    									'response.Write( objRS("cod_fisc") )
    									'response.write "'>"
    									'response.Write( objRS("cod_fisc") )
    									'response.write "</A>
    </font></td>"
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("email") & "</font></center></td>"
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("citta") & "</font></td>" 
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("descrizione") & "</font></td>" 
    									
    									Response.Write "<td> [img] & objRS([/img]</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%>
    			
    
    
    			<%If ipagecount <> 1 Then%>
    				<center>
    				<table>
    					<tr valign="middle">
    						<td width="50%" align="center" valign="middle"><font face="verdana" size="1" color="#000000">
    							[
    							<%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%>
    								[img]images/first.gif[/img]
    							<%end if%>
    							<%if iPageCurrent > 1 then%>
    								[img]images/pre.gif[/img]
    							<%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%>	
    									<%=i%>
    								<%end if%>	
    							<%next%>
    							<%if iPageCurrent > 0 and iPageCurrent < iPageCount then%>
    								[img]images/next.gif[/img]
    							<%end if%>	
    							<%if iPageCurrent+1 < iPageCount then%>
    								[img]images/last.gif[/img]
    							<%end if%>	
    							]
    						</font></td>
    					</tr>
    					<tr>
    						<td colspan="2" align="center"><font face="verdana" size="1" color="#000000">
    							<center>
    							Pagina
    								<font color="#FF0000"><%=iPageCurrent%></font>
    								di
    								<font color="#FF0000"><%=iPageCount%></font>
    							</center>
    						</font></td>
    					</tr>
    				</table>
    				</center>
    			<%end if%>
    			<%
    			objConn.Close
    			Set objConn = Nothing
    			%>
    		</TD>
    	</TR>
    </TABLE>		
    </body>
    </html>
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  9. #9
    Trovato l'arcano, nell'apertura del recordset chiami objConn come connessione ma nel file conndb.asp la connessione di chiama Conn

    sostituisci la tua apertura con questa

    objRS.Open strSQL, Conn, adOpenStatic, adLockReadOnly, adCmdText

  10. #10
    scusa ma mentre modificavo il codice (avevo postato quello sbagliato) tu hai risposto.
    ti posto il codice esatto ( e definitivo ):

    ti posto i due file:
    trova.asp

    codice:
    <form action="default_cerca.asp" method="post" name="DaForm">
          <select name="TypeSearch" size="1">
    <option value="*"  Selected>Provincie</option>
    <option value="AG" >Agrigento</option>
    <option value="AL">Alessandria</option>
    ......
    <option value="VI" >Vicenza</option>
    <option value="VT" >Viterbo</option>
     </select>
          <input type="submit" name="B1" value="Visualizza" style="border-style: solid; border-width: 1">
        </form>
    default_cerca.asp

    codice:
    <%@ Language=VBScript %> 
    <% response.buffer=true %>
    <% Server.ScriptTimeout = 300 %>
    
    
    
    <html>
    <head>
    	<title>Consorzio Didaform - Tel 091/308434 - Fax 091/304050</title>
    
    </head>
    <BODY MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0" >
    <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" align="center">
      <TR height="60" valign="middle">
    		
        <TD align="center" width="816"> <font face="Verdana" size="4">schede presenti nel database</font></TD>
    	<TR>
    		<TD width="816">	
    			<%
    			
    			
    		Dim strSQL 
    		iPageSize = 20 'NUMERO RECORD PER PAGINA
    
    					If Request.QueryString("page") = "" Then
    						iPageCurrent = 1
    					Else
    						iPageCurrent = CInt(Request.QueryString("page"))
    					End If
    	
    	
    		strSQL = "SELECT * FROM schede WHERE citta LIKE '%" & Request.Form("TypeSearch") & "%' ORDER BY cognome ASC"
    			Set objRS = Server.CreateObject("ADODB.Recordset")
    			objRS.PageSize = iPageSize
    			objRS.CacheSize = iPageSize
    			objRS.Open objRS.Open strSQL, Conn, 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 "
    
    <table><td><font  face='verdana' size='3' color='#000000'><center>Non sono stati trovati Curriculum.</td></table></center></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="10%"align="center"><font face="verdana" size="1" color="#000000">[b]N°</font></td>									
                    <td bgcolor="#dddddd" WIDTH="25%" align="center"><font face="verdana" size="1" color="#000000">Cognome e Nome </font></td>									
                    <td bgcolor="#dddddd" WIDTH="20%" align="center"><font face="verdana" size="1">email</font></td>									
                    <td bgcolor="#dddddd" WIDTH="15%" align="center"><font size="1" face="verdana">Citta</font></td>									
                    <td bgcolor="#dddddd" WIDTH="40%" align="center"><font face="verdana" size="1">descrizione</font></td>									
                    <td bgcolor="#dddddd" WIDTH="15%"  align="center"><font face="verdana" size="1">foto</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='2'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("cognome") & "</font></center></td>"
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("nome") & "</font></center></td>"
    
    									'response.write "<td><font color='#000000' face='Verdana' size='1'><A HREF='http://www.didaform.sicilia.it/area_riservata/curriculum/visualizza_da_elenco.asp?cod_fisc=" 
    									'response.Write( objRS("cod_fisc") )
    									'response.write "'>"
    									'response.Write( objRS("cod_fisc") )
    									'response.write "</A>
    </font></td>"
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'><center>" & objRS("email") & "</font></center></td>"
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("citta") & "</font></td>" 
    									
    									Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & objRS("descrizione") & "</font></td>" 
    									
    									Response.Write "<td> [img] & objRS([/img]</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%>
    			
    
    
    			<%If ipagecount <> 1 Then%>
    				<center>
    				<table>
    					<tr valign="middle">
    						<td width="50%" align="center" valign="middle"><font face="verdana" size="1" color="#000000">
    							[
    							<%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%>
    								[img]images/first.gif[/img]
    							<%end if%>
    							<%if iPageCurrent > 1 then%>
    								[img]images/pre.gif[/img]
    							<%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%>	
    									<%=i%>
    								<%end if%>	
    							<%next%>
    							<%if iPageCurrent > 0 and iPageCurrent < iPageCount then%>
    								[img]images/next.gif[/img]
    							<%end if%>	
    							<%if iPageCurrent+1 < iPageCount then%>
    								[img]images/last.gif[/img]
    							<%end if%>	
    							]
    						</font></td>
    					</tr>
    					<tr>
    						<td colspan="2" align="center"><font face="verdana" size="1" color="#000000">
    							<center>
    							Pagina
    								<font color="#FF0000"><%=iPageCurrent%></font>
    								di
    								<font color="#FF0000"><%=iPageCount%></font>
    							</center>
    						</font></td>
    					</tr>
    				</table>
    				</center>
    			<%end if%>
    			<%
    			objConn.Close
    			Set objConn = Nothing
    			%>
    		</TD>
    	</TR>
    </TABLE>		
    </body>
    </html>
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.