Prb en asp aide moi
Fermé
amira01
Messages postés
54
Date d'inscription
samedi 30 juin 2001
Statut
Membre
Dernière intervention
24 janvier 2005
-
2 août 2001 à 21:09
amira01 - 6 août 2001 à 18:13
amira01 - 6 août 2001 à 18:13
A voir également:
- Prb en asp aide moi
- Asp .net download - Télécharger - Divers Web & Internet
- Asp informatique - Télécharger - Gestion de données
- Asp ldap - Forum Webmastering
- Asp 4.0.30319 ✓ - Forum Windows
- Asp php jsp - Forum PHP
2 réponses
Hello,
voici un aurte code qui fait à peu près la même chose :
<%
fp_sNoRecords = "Aucun enregistrement n'a été trouvé dans la base"
Dim RS
ConnectionString = "dsn=nomdudsn"
fp_sQry = "select * from brochure"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open fp_sQry, ConnectionString
If RS.EOF And RS.BOF Then
Response.Write fp_sNoRecords
Else
%>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr align="center" bgcolor="#ffcc33">
<td bgcolor="#99FF00"><b>Genre</b></td>
<td bgcolor="#99FF00"><b>Prénom - Nom<br>
e-mail </b></td>
<td bgcolor="#FF99FF"><b>adresse</b></td>
<td bgcolor="#FF99FF"><b>Tel / Fax</b></td>
<td bgcolor="#99FFCC">
<p><b> Brochure</b> /<br>
<b>Envoyée le</b></p>
</td>
<td bgcolor="#99FFCC"><b>Op</b></td>
</tr>
<% do while not RS.EOF %>
<tr>
<td valign="top">
<%if RS("genre").value=1 then
response.write "M."
elseif RS("genre").value=2 then
response.write "Mme"
else response.write "Melle"
end if
%>
</td>
<td valign="top"><%=RS("prenom").value%> <%=RS("nom").value%><br>
<%=RS("email").value%></td>
<td valign="top"><%=RS("adresse").value%><br>
<%=RS("adresse2").value%><br>
<%=RS("codepostal").value%> <%=RS("ville").value%> </td>
<td valign="top"><%=RS("telephone").value%><br>
<%=RS("fax").value%> </td>
<td valign="top"><%=RS("AskBrochure").value%><br>
<%=RS("SentBrochure").value%> </td>
<td>
<input type="checkbox" name="checkbox" value="checkbox">
</td>
</tr>
<%
RS.movenext
Loop
end if
%>
</table>
<%
end if 'du codeop=1
%>
voici un aurte code qui fait à peu près la même chose :
<%
fp_sNoRecords = "Aucun enregistrement n'a été trouvé dans la base"
Dim RS
ConnectionString = "dsn=nomdudsn"
fp_sQry = "select * from brochure"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open fp_sQry, ConnectionString
If RS.EOF And RS.BOF Then
Response.Write fp_sNoRecords
Else
%>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr align="center" bgcolor="#ffcc33">
<td bgcolor="#99FF00"><b>Genre</b></td>
<td bgcolor="#99FF00"><b>Prénom - Nom<br>
e-mail </b></td>
<td bgcolor="#FF99FF"><b>adresse</b></td>
<td bgcolor="#FF99FF"><b>Tel / Fax</b></td>
<td bgcolor="#99FFCC">
<p><b> Brochure</b> /<br>
<b>Envoyée le</b></p>
</td>
<td bgcolor="#99FFCC"><b>Op</b></td>
</tr>
<% do while not RS.EOF %>
<tr>
<td valign="top">
<%if RS("genre").value=1 then
response.write "M."
elseif RS("genre").value=2 then
response.write "Mme"
else response.write "Melle"
end if
%>
</td>
<td valign="top"><%=RS("prenom").value%> <%=RS("nom").value%><br>
<%=RS("email").value%></td>
<td valign="top"><%=RS("adresse").value%><br>
<%=RS("adresse2").value%><br>
<%=RS("codepostal").value%> <%=RS("ville").value%> </td>
<td valign="top"><%=RS("telephone").value%><br>
<%=RS("fax").value%> </td>
<td valign="top"><%=RS("AskBrochure").value%><br>
<%=RS("SentBrochure").value%> </td>
<td>
<input type="checkbox" name="checkbox" value="checkbox">
</td>
</tr>
<%
RS.movenext
Loop
end if
%>
</table>
<%
end if 'du codeop=1
%>