Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 18
  1. #1
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560

    errore Object required: ''

    cosa sbaglio?..


    Microsoft VBScript runtime error '800a01a8'

    Object required: ''

    /include/inc_news.asp, line 11



    codice:
    <%
    	'VERSIONE FILE 1.4.0
    %>
    <% 
    
    RecordsPerPagina = 1
    page = Request("page") 
    if page="" then page=1
    
    
    RS.Open SQL, Conn, 1
    
    RS.PageSize = RecordsPerPagina 
    RS.AbsolutePage = page 
    If RS.Eof=True or RS.Bof=True then					
    
    response.Write("<font face='Arial' color='#D35B09'>Non ci sono annunci in questa categoria.</font>" & "
    ")
    Response.Write("Sfoglia le altre categorie.")
    response.end
    
    Else
    %>
    <div align="justify">
    		
               
    
    
    
      </div>
      <%
    For i=1 to RecordsPerPagina 
    if Not RS.EOF then 
    %>
    	<table width="480" border="1" align="center" height="150" cellpadding="3" cellspacing="1">
    <%
    '---Dichiarazione variabili
    	Dim SQL, RSnews, CicloNews, PageSize, AbsolutePage, Page, RecordsPerPagina, RS
    
    '---Recupero le ultime News dal database e le stampo a video
    	Set RSnews = Server.CreateObject("ADODB.RecordSet")
    	SQL = " SELECT * FROM News ORDER BY ID DESC"
    	RSnews.Open SQL, Conn, 1
    
    	If NOT RSNews.EOF Then
    		For CicloNews = 1 To MaxNews
    			If RSNews.EOF Then Exit For
    %>
    		<tr bgcolor="<%=Tabella_Colore_Titolo%>">
    			<td colspan="2">
    				  <%= RSnews("Titolo") %>
    			</td>
    		</tr>
    		<tr>
    <%
    			If Len(RSnews("Img")) > 0 Then
    %>
    				<td width="120" align="center" valign="top">
    					" target="_blank">[img]<%=RSnews([/img]" alt="<%=RSnews("Testolink")%>" width="80" height="83" border="1">
    				</td>
    				<td width="21000" valign="top">
    <%
    			Else
    %>
    				<td width="480" valign="top" colspan=2>
    <%
    			End If
    %>
    				<p align="justify"><%= RSnews("Testo") %> </p>
    			</td>
    		</tr>
    <%
    				RSnews.MoveNext
    		Next
            Else
    %>
    		<tr>
    			<td align="center" valign="top" colspan="2">
    				<%=Errore_NoNews%>
    			</td>
    		</tr>
    <%
    RS.movenext
    end if 
     
    End if
    
    %>
    </table>
    <% ' Pagina precedente
    If Not Page = 1 Then %>
    Pagina precedente |  
    <% End If
    ' Ciclo per recupero numerico delle pagine
    For Page = 1 To Rs.PageCount %>
    <% = Page%>
    <%Next 
    ' Pagina successiva
    If Not Page = Rs.PageCount Then %> | 
    Pagina successiva
    <% End if
    
    
    Rs.close
    set Rs = nothing
    conn.close
    set conn = nothing
    %>
    
    
    <table width="96" border="0" align="right">
                      <tr>
                        <th height="18" class="sm Stile2  Stile5" scope="col"><span class="sm  big Stile6"><span class="sm  big Stile7"><span class="sm  big">indietro[img]<%=Path_Img%>catalogo_indietro.gif[/img]" width="18" height="21" border="0"></span></span></span></th>
                      </tr>
                </table>

  2. #2

  3. #3
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    riga 11: RS.Open SQL, Conn, 1

    se la commento così: 'RS.Open SQL, Conn, 1

    mi da un altro errore tipo:

    Microsoft VBScript runtime error '800a01a8'

    Object required: ''

    /include/inc_news.asp, line 13


  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Conn ??????

    Dove lo definisci?

    Roby

  5. #5
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    nella pagina news.asp che contiene l include(inc_news.asp codice postato su..)

    news.asp:

    codice:
    <%
    	'VERSIONE FILE 1.4.0
    
    '---Dichiarazione variabili
    	Dim Conn
    
    '---Apertura del database DSNLess
    	Set Conn = Server.CreateObject("ADODB.Connection")
    	Conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&server.mappath("/mdb-database/ecom.mdb")
    
    '---Apertura del database con DSN (decommentare e creare un DSN apposito)
    	'Conn.Open "DSN = MWOpen"
    %>
    mi sa che devo inserire qualcosa nel db vero?..

  6. #6
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Ma nel tuo codice non c'è l'inclusione a quel file...

    Roby

  7. #7
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    si nella pagina news.asp ci sono anche queste inclusioni:






  8. #8
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    se metto così:

    RecordsPerPagina = 1
    page = Request("page")
    if page="" then page=1

    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("mdb-database/ecom.mdb")
    SQL = "SELECT * from annunci WHERE categoria = 'veicoli' ORDER BY data ASC"
    Set Rs = Server.CreateObject("ADODB.Recordset")

    RS.Open SQL, Conn, 1

    RS.PageSize = RecordsPerPagina
    RS.AbsolutePage = page
    If RS.Eof=True or RS.Bof=True then

    mi da questo errore:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

    ODBC driver does not support the requested properties.

    /include/inc_news.asp, line 15


    riga 15: RS.Open SQL, Conn, 1



  9. #9
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    roby se mi dici che pagina ti devo postare lo faccio...vorrei fare questa paginazione..

  10. #10
    Utente di HTML.it L'avatar di Lino80
    Registrato dal
    Oct 2005
    Messaggi
    1,560
    up

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 © 2026 vBulletin Solutions, Inc. All rights reserved.