Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2007
    Messaggi
    2

    Intabellare su tre colonne

    Salve a tutti.
    Sto cercando di intabellare i risultati di una query su tre colonne.
    L'output mi da:
    Impossibile visualizzare la pagina
    Tipo di errore: Errore di compilazione di Microsoft VBScript (0x800A0400)
    Prevista istruzione
    wend


    Dove sbaglio?


    <%
    Set con = Server.CreateObject( "ADODB.Connection" )
    strDB= Server.MapPath(dirDB & "prova.mdb")
    con.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & strDB
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.ActiveConnection = Con
    rs.Open "Select * FROM tab_test order by testname"
    set objtestname=rs("testname")
    %>


    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <%
    Dim j
    j = 2

    if rs.EOF = false then
    while not rs.EOF

    if j = 2 then %>
    <tr>
    <td><%=objtestname%></td>
    <%
    j = j - 1
    else if j = 1 then %>
    <td><%=objtestname%></td>

    <%
    j = j - 1
    else %>
    <td><%=objtestname%></td>
    </tr>

    <%
    j = 2
    end if

    rs.MoveNext

    wend
    end if
    %>
    </table>

  2. #2
    Utente di HTML.it L'avatar di willybit
    Registrato dal
    May 2001
    Messaggi
    4,367

    Re: Intabellare su tre colonne

    o usi elseif tutto attaccato oppure metti l'end if che manca

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2007
    Messaggi
    2
    azz...
    grazie...!

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.