Bonjour à tous,
je rencontre un problème sur l'affichage des résultats issus de la 2ème liste.
En fait je vais cherché des valeurs dans une table DOWNLOAD, Categorie_produit pour la 1ère liste et en fonction de la sélection j'affiche la ref_produit dans la 2ème liste.
Jusque la pas de problème, la 2ème liste est bien alimentée en fonction du choix de la 1ère, mais en revanche je voudrais afficher en fonction du choix cette 2ème liste les valeurs suivantes dans un tableau : ref_produit, nom_produit et nom_fichier1.
Mais j'ai toujours le même message d'erreur "[Microsoft][Pilote ODBC Microsoft Access] Type de données incompatible dans l'expression du critère.
/asp/TEST.asp, line 62 "
je vous met ci-dessous le code de la page.
"<!--#include file="_connexion2.asp"-->
<link href="../../style.css" rel="stylesheet">
<%zone1=Request.Form("zone1")%>
<%zone2=Request.Form("zone2")%>
<table border=1 bordercolor="#FF0000" cellpadding="4" cellspacing="0" align="center" width="70%">
<tr><td style="font-family:Arial, Helvetica, sans-serif; font-size:24px" align="center">Les notices d'utilisations</td></tr></table>
<br><br><br><br><br>
<table border=0 align="center">
<tr>
<td>Sélectionner la catégorie de produit pour laquelle vous recherchez une notice d'utilisation.<br>
<form method="POST" name="download" action="TEST.asp">
<select name="zone1" size="1" onChange="javascript:download.submit()">
<%if zone1<>"" then%><option><%=zone1%></option>
<%else%><option value=''>Sélectionner</option><%end if
Requete = "Select DISTINCT categorie_produit from download"
set rs= conn2.Execute(Requete)
if rs.eof=false then
rs.MoveFirst
do while not rs.eof
if rs("categorie_produit")<>zone1 then%>
<option value='<%=rs("categorie_produit")%>'><%=rs("categorie_produit")%></option>
<%end if
rs.MoveNext
loop
end if%>
</select>
</form>
<%if zone1<>"" then
Requete = "Select * from download WHERE categorie_produit='"&zone1&"' ORDER BY ref_produit ASC"
set rs= conn2.Execute(Requete)
if rs("nom_produit")<>zone1 then%>
<form method="POST" name="download2" action="TEST.asp">
<input type="hidden" name="zone1" value="<%=zone1%>">
<select name="zone2" size="1" onChange="javascript:download2.submit()">
<%if zone2<>"" then%><option><%=zone2%></option>
<%else%><option value=''>Sélectionner</option><%end if
if rs.eof=false then
rs.MoveFirst
do while not rs.eof
if rs("ref_produit")<>zone2 then%>
<option value='<%=rs("ref_produit")%>'><%=rs("ref_produit")%></option>
<%end if
rs.MoveNext
loop
end if%>
</select>
</form>
<%if zone2<>"" then
Requete = "Select * from download WHERE ref_produit='"&zone2&"' ORDER BY ref_produit ASC"
set rs= conn2.Execute(Requete)
if rs("nom_produit")<>zone2 then%>
<table border="1" bordercolor="#FFFFFF" cellpadding="4" cellspacing="0" width="500">
<tr bgcolor="#CCCCCC"><td align="center"><b>Référence</b></td>
<td align="center"><b>Nom du produit</b></td>
<td align="center"><b>Lien de téléchargement</b></td></tr>
<tr>
<td align="center" style="border-bottom-color:#000000"><%=rs("ref_produit")%></td>
<td align="center" style="border-bottom-color:#000000"><%=rs("nom_produit")%></td>
<td align="center" style="border-bottom-color:#000000"><a href="fichiers/notices/<%=rs("nom_fichier1")%>">Manuel d'utilisation</a></td>
<%end if%>
<%end if%>
<%end if%>
<%end if%>
<%
rs.close
set rs=nothing
conn2.close
set conn2=nothing
%>
Merci d'avance pour l'aide que vous pourrez m'apporter!!!
Je pense qu'il ne manque pas grand chose mais je ne trouve pas!
Partager