Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    69

    ASP Dreamweaver Mx in Set di Pagina principale/dettaglio

    Salve dovrei creare un set pagina principale/dettaglio però il tutto nella stessa pagina asp. Come posso fare?
    In pratica si tratta di news
    ho un db di access con
    idnews
    data
    news
    descrizione

    io nella parte alta della pagina dovrei inserire un'area ripetuta con la "lista" delle news con
    idnews
    data
    news

    e nella parte bassa vorrei visualizzare la descrizione, in modo tale che cliccando sulla linea 3 (della parte alta della finestra) che ha l'idnews 3 in basso vorrei visualizzare la relativa descrizione.
    . . . e così via.
    Ho provato a farlo ma non funziona.
    qualcuno ha qualche buona idea?
    grazie

  2. #2
    Utente di HTML.it L'avatar di Fichico
    Registrato dal
    Nov 2002
    residenza
    Bologna
    Messaggi
    581
    inizia a testare scrivendo un po' di codice e poi postalo se non funge

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    69

    come faccio?

    Ciao non sono tanto bravo ad usare il codice, ho usato il wizard per farlo e al posto di cambiare pagina come pagina di dettaglio ho inserito la stessa. al max faccio di nuovo la pagina e posto il codice d'errore che mi restituisce quando la provo...

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    69

    Codice

    Ciao questo è l'errore che mi da:

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

    [Microsoft][Driver ODBC Microsoft Access] Errore di sintassi (virgola) nell'espressione della query 'idnw = 2, 2'.

    /news.asp, line 34

    questa è la parte del codice dove penso ci sia l'errore:

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

    <%
    Dim News
    Dim News_numRows

    Set News = Server.CreateObject("ADODB.Recordset")
    News.ActiveConnection = MM_Conn_STRING
    News.Source = "SELECT * FROM NEWS"
    News.CursorType = 0
    News.CursorLocation = 2
    News.LockType = 1
    News.Open()

    News_numRows = 0
    %>
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "1"
    If (Request.QueryString("idnw") <> "") Then
    Recordset1__MMColParam = Request.QueryString("idnw")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_Conn_STRING
    Recordset1.Source = "SELECT * FROM NEWS WHERE idnw = " + Replace(Recordset1__MMColParam, "'", "''") + ""
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 3
    Recordset1.Open()

    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index

    Repeat1__numRows = 10
    Repeat1__index = 0
    News_numRows = News_numRows + Repeat1__numRows
    %>
    <%
    ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

    Dim News_total
    Dim News_first
    Dim News_last

    ' set the record count
    News_total = News.RecordCount

    ' set the number of rows displayed on this page
    If (News_numRows < 0) Then
    News_numRows = News_total
    Elseif (News_numRows = 0) Then
    News_numRows = 1
    End If

    ' set the first and last displayed record
    News_first = 1
    News_last = News_first + News_numRows - 1

    ' if we have the correct record count, check the other stats
    If (News_total <> -1) Then
    If (News_first > News_total) Then
    News_first = News_total
    End If
    If (News_last > News_total) Then
    News_last = News_total
    End If
    If (News_numRows > News_total) Then
    News_numRows = News_total
    End If
    End If
    %>
    <%

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.