Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it L'avatar di mdegiova
    Registrato dal
    Feb 2009
    residenza
    Sondrio
    Messaggi
    134

    database access con piu tabelle

    scusate ho un problema con la lettura di un databese access con piu tabelle senza identificativo in comune.

    cioè il database access serve come traduttore di codici numerici in testi :

    esempio 0102 = Casa
    0203= Ciesa

    ecc..

    sono riuscito ad effetturae la visualizzazione dei dati solo per una riga ora dovre portare la visualizzazione per tutto quello che trova in una ricerca effettuata precedentemente .

    Il codice che uso è il seguente :
    -----------------------------------------------------------------------
    <% LANGUACE="VBSCRIPT" %>

    <%
    ID_ZRIL = Request("ID_ZRIL")
    EDIFC_TY = Request("EDIFC_TY")
    EDIFC_USO = Request("EDIFC_USO")
    EDIFC_STAT = Request("EDIFC_STAT")
    set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("A020102.mdb")
    %>

    <html>
    <head>

    <%
    set Q1 = conn.execute("select * from 02010201 where cod_1 like '"& "%" & EDIFC_TY & "%" & "'")
    if not Q1.EOF then

    set Q2 = conn.execute("select * from 02010202 where cod_2 like '"& "%" & EDIFC_USO & "%" & "'")
    if not Q2.EOF then

    set Q3 = conn.execute("select * from 02010204 where cod_3 like '"& "%" & EDIFC_STAT & "%" & "'")
    if not Q3.EOF then
    %>

    <table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
    <tr bgcolor="#EFEFEF">
    <td width="100"><div align="center" class="Stile2"><%= Request("FEATURE_ID")%></div></td>
    <td width="100"><div align="center" class="Stile2"></td>
    <td width="100"><div align="center" class="Stile2"><%= Q1("txt_1") %></div></td>
    <td width="100"><div align="center" class="Stile2"><%= Q2("txt_2") %></div></td>
    <td width="100"><div align="center" class="Stile2"><%= Q3("txt_3") %></div></td>
    </table>

    <%
    Q1.movenext
    end if
    Q1.close
    set Q1 = Nothing

    Q2.movenext
    end if
    Q2.close
    set Q2 = Nothing

    Q3.movenext
    end if
    Q3.close
    set Q3 = Nothing
    %>
    </body>
    </html>
    <%
    conn.close
    set conn = nothing
    %>


    il probleba è in "movenext".....come posso fare?

  2. #2

  3. #3
    Utente di HTML.it L'avatar di mdegiova
    Registrato dal
    Feb 2009
    residenza
    Sondrio
    Messaggi
    134
    in poche parole

    sono come delle ricerche indipendenti in varie tabelle del medesimo database che compilano

    un tabella nella pagina asp

    il problema è che dovremme farmi vedere piu tabelle compilate in base al numero di campi trovati, ma me ne mostra solo una.

    come faccio ?

  4. #4
    semplicemente NON nidificare

    select...
    table

    select...
    table

    select...
    table

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.