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?

Rispondi quotando