Bonjour !
Voici mon pb :
Erreur de compilation Microsoft VBScript
error '800a0401'Fin d'instruction attendue
/iisHelp/common/500-100.asp, line 11
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^
Microsoft OLE DB Provider for ODBC Drivers
error '80040e14'[Microsoft][Pilote ODBC Microsoft Access] Erreur de syntaxe (opérateur absent) dans l'expression 'id_pays='.
/itcos/caddie.asp, line 65
le code :
<%
if session("item")=0 then
response.redirect "caddievide.asp"
end if
Temp=Session("Caddy")
select case request("Action")
case "Vider le Caddy"
session("pays")=request("livraison_pays")
session("Item")=0
response.redirect "caddievide.asp"
case "Commander"
session("pays")=request("livraison_pays")
direc="commande.asp?paiement="&request.querystring("paiement")
response.redirect direc
case "Recalculer"
session("pays")=request("livraison_pays")
for i=0 to session("item")-1
Qte="quantite"&i
if isNumeric(request(Qte)) then
if int(request(Qte))>0 then
Temp(2,i)=int(request(Qte))
end if
end if
Session("Caddy")=Temp
next
response.redirect "caddie.asp"
end select
If IsObject(Session("boutique_conn")) Then
Set conn = Session("boutique_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
' chaine de connexion
connstring="DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.MapPath(".") & "/produits.mdb"
conn.Open connstring
Set Session("boutique_conn") = conn
End If
' calcul des totaux
totalHt=0
TotalPort=0
Qte=0
for i=0 to session("Item")-1
TotalHt=TotalHt+temp(3,i)*temp(2,i)
TotalPort=TotalPort+temp(4,i)*temp(2,i)
Qte=Qte+temp(2,i)
next
strtotal=replace(cstr(totalport),",",".")
sql = "SELECT port.* FROM port WHERE ("& strtotal &">port.Kgbase_Port) "
Set port = Server.CreateObject("ADODB.Recordset")
port.Open sql, conn, 3, 3
port.movelast
sql = "SELECT pays.* FROM pays where id_pays="&session("pays")
Set pays = Server.CreateObject("ADODB.Recordset")
pays.Open sql, conn, 3, 3
pays. movefirst
%>
<%
TotalPort=port.fields("Prix").value*pays.fields("Port_pays").value
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title>Sélection d'une devise</title>
</head>
<body>
<%
'sélection des devise disponibles
sql = "SELECT devises.* FROM devises WHERE Id_devise="&session("devise")
Set devise = Server.CreateObject("ADODB.Recordset")
devise.Open sql, conn, 3, 3
devise. movefirst
%>
<%
'sélection des pays disponibles
sql = "SELECT pays.* FROM pays "
Set pays = Server.CreateObject("ADODB.Recordset")
pays.Open sql, conn, 3, 3
pays. movefirst
%>
<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td valign="top"><!-- #include file="entete.asp"--> </td>
</tr>
<tr>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
</form>
<tr>
<td valign="top"><!-- #include file="sommaire.asp"--></td>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0" width="450">
<tr>
<td bgcolor="#000000"><font color="#E2BB1D" face="Arial"><strong><small>Contenu de votre
Caddie</small></strong></font></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td> <div align="center"><center><table border="0" cellpadding="0" cellspacing="0"
width="500">
<tr align="center">
<td></td>
</tr>
<tr align="center">
<td align="center"><div align="left"><table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td valign="baseline"><div align="left"><table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr align="center">
<td width="100%"></td>
</tr>
<tr align="center">
<td width="100%" bgcolor="#FFFFFF"><div align="left"><table border="0" cellpadding="0"
cellspacing="1" width="100%">
<tr>
<td></td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#000000"></td>
<td width="40%" align="center" bgcolor="#000000"><font face="Arial" color="#FFFFFF"><small>Titre</small></font></td>
<td width="15%" align="center" bgcolor="#000000"><font face="Arial" color="#FFFFFF"><small>Quantité</small></font></td>
<td width="20%" align="center" bgcolor="#000000"><font face="Arial" color="#FFFFFF"><small>PU.
HT</small></font></td>
<td width="20%" align="center" bgcolor="#000000"><font face="Arial" color="#FFFFFF"><small>P.
Total HT</small></font></td>
</tr>
<%for i=0 to session("item")-1%>
<tr>
<td width="5%" align="center" bgcolor="#F3E2A0"><font face="Arial"><a
href="supprcaddie.asp?ligne=<%=i%>"><img src="Poub.gif" alt="supprimer la ligne" border="0"
width="20" height="21"></a> </font></td>
<td width="40%" align="center" bgcolor="#F3E2A0"><div align="left"><p><font face="Arial"
size="2"><%=Temp(1,i)%></font> <br>
</td>
<td width="15%" align="center" bgcolor="#F3E2A0"><font face="Arial"><input type="text"
value="<%=Temp(2,i)%>" size="2" name="quantite<%=i%>"> </font></td>
<td width="20%" align="center" bgcolor="#F3E2A0"><font face="Arial" size="2"><%=formatnumber((Temp(3,i)/devise.fields("prix_devise").value),2)%></font> </td>
<td width="20%" align="center" bgcolor="#F3E2A0"><font face="Arial" size="2"><%=formatnumber((Temp(3,i)*Temp(2,i))/devise.fields("prix_devise").value,2)%></font> </td>
</tr>
<%next%>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
<tr align="center">
<td><div align="left"><table border="0" cellpadding="0" width="100%" cellspacing="0">
<tr>
<td bgcolor="#F3E2A0"><div align="left"><p><font face="Arial" color="#800000"><small>Pays de
livraison : </small></font><font color="#E2BB1D"><select name="livraison_pays" size="1">
<% pays.movefirst
do while not pays.eof
%> <option <%if cint(pays.fields("id_pays").value)=cint(session("pays")) then %> selected
<% end if%> value="<%=pays.fields("id_pays").value%>"><%=pays.fields("titre_pays").value%></option>
<% pays.movenext
Loop
%> </select> </font></td>
</tr>
</table>
</div><div align="left"><table border="0" cellpadding="0" cellspacing="1" width="100%"
height="127">
<tr>
<td width="60%" align="center" bgcolor="#FFFFFF" height="69" rowspan="3"><table border="0"
cellspacing="1" width="150">
<tr>
<td bgcolor="#F3E2A0"><font face="Arial"><small><input type="radio" value="1" name="paiement">Par
chèque</small></font></td>
</tr>
<tr>
<td bgcolor="#F3E2A0"><font face="Arial"><small><input type="radio" name="paiement" value="2"
checked>Par Carte Bancaire</small></font></td>
</tr>
</table>
</td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="21"><small><font face="Arial">TOTAL
HT</font></small></td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="21"><font face="Arial" size="2"
color="#800000"><strong><%=formatnumber(TotalhT/devise.fields("prix_devise").value,2)%> </strong></font></td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#F3E2A0" height="21"><small><font face="Arial">TVA
20,6%</font></small></td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="21"><font face="Arial" size="2"
color="#800000"><strong><%=formatnumber((TotalhT/devise.fields("prix_devise").value)*0.206,2)%> </strong></font></td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#F3E2A0" height="27"><small><font face="Arial">Frais
de Ports</font></small></td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="27"><font face="Arial" size="2"
color="#800000"><strong><%=formatnumber((Totalport/devise.fields("prix_devise").value),2)%> </strong></font></td>
</tr>
<tr>
<td width="60%" align="center" bgcolor="#FFFFFF" height="27"></td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="27"><small><font face="Arial">Total
TTC</font></small></td>
<td width="20%" align="center" bgcolor="#F3E2A0" height="27"><font face="Arial" size="2"
color="#800000"><strong><%=formatnumber((((TotalHt-remise)*1.206+TotalPort)/devise.fields("prix_devise").value),2)%> <%if devise.fields("Symb_devise")<>"na" then%><%=devise.fields("Symb_devise")%><%else%><img src="<%=devise.fields("Image_devise")%>" align="middle"><% end if%></strong></font></td>
</tr>
<tr>
<td width="60%" align="center" bgcolor="#FFFFFF" height="21">
<form method="GET" action="caddie.asp">
<input type="submit" value="Recalculer" name="Action">
<input type="submit" value="Vider le Caddy" name="Action"></td>
<td width="40%" align="center" colspan="2" height="21"><font face="Arial">
<input type="submit" value="Commander" name="Action"></font></td>
</form>
</tr>
</table>
</div><div align="left"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><div align="center"><center><table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><font face="Arial"><br>
<small>Pour <strong>supprimer</strong> une ligne du Caddy, cliquez sur la petite poubelle à
gauche dans la ligne. Pour <strong>ajouter</strong> un produit, cliquez sur le produit en
sélection dans la barre de navigation sur le gauche ou en haut sur produits. Pour <strong>commander</strong>
plusieurs produits identiques, <strong>modifiez</strong> la quantité, puis cliquez sur
"recalculer".<br>
Vous pouvez commander par chèque ou par carte Bleue, dans ce cas vous fournirez vos
informations personnelles sur un espace sécurisé.</small></font> </td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
ce code est cense gerer un caddie
merci d votre aide