Qu'est ce qui cloche? Voici mon code:
[code]
<%
dim cn
dim rc
dim nbre
dim sql
Set cn = CreateObject("ADODB.Connection")
cn.Provider="Microsoft.Jet.OLEDB.4.0"
cn.ConnectionString=Server.MapPath("../..") & \inetpub\wwwroot\compteur\compteur.mdb"
cn.Open()
Set rc=CreateObject("ADODB.Recordset")
sql= " select * from compte"
rc.Open sql,cn
nbre=rc("nbr")
nbre=nbre+1
session("nbre")=nbre
Set rc2=Server.CreateObject("ADODB.Recordset")
sql= " Update compte set nbr = '" & nbre & "'"
rc2.Open sql,cn
cn.Close
Set cn = Nothing
set rc = Nothing
set rc2 = Nothing
%>
<html>
<head>
<title>compteur</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<table width="26%" border="0" bgcolor="#006699" align="center" height="62">
<tr bgcolor="#FFFFFF">
<td height="39"><div align="center"><%
longueur = len(session("nbre"))
SELECT CASE longueur
CASE 1
for i =1 to 5
%><img src="\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 2
for i =1 to 4
%><img src="\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 3
for i =1 to 3
%><img src="\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="http://10.78.32.214/images/compteur/<%=numero%>.gif" width="10" height="13"><%next
CASE 4
for i =1 to 2
%><img src="\images\compteur\0.gif" width="10" height="13"><%
next
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 5%><img src="\images\compteur\0.gif" width="10" height="13"><%for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="\images\compteur\<%=numero%>.gif" width="10" height="13"><%next
CASE 6
for i =1 to longueur
numero=mid(session("nbre"),i,1)
%><img src="\images\compteur\<%=numero%>.gif" width="10" height="13"><%next%><%end select%>
</div>
</td>
</tr>
</table>
</body>
</html>
[/code]
merci à tous par avance