QUESTO DOVREBBE ESSERE LA CONNESSIONE AI DATI:
<%
Dim vPath, pPath, ConString
vPath = "mdb-database/metacart.mdb" 'use this one if database is in root of cart folder
'vPath = "/mdb-database/metacart.mdb" 'use this one if database is in root of your website
pPath = Server.MapPath( vPath )
ConString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & pPath & ";" & "JET OLEDB:Database Password=foo"
%>
SI TROVA IN CIMA ALLA PAGINA "PRODUCT.ASP"
IL CODICE PAGINA E' QUESTO:
<%@ Language=VBScript %>
<% pageTitle = "Cellulandia KR" %>
<!-- #include file="db.asp" -->
<!-- #include file="adovbs.inc" -->
<%
intProdID = Request.QueryString("intProdID")
%>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft FrontPage 5.0">
<title><%= pageTitle %></title>
<script LANGUAGE="JScript"><!--
function AbortEntry(sMsg, eSrc)
{
window.alert(sMsg);
// set focus and highlight to the offending error
eSrc.focus();
//eSrc.select();
}
function HandleError(eSrc)
{
// make sure the input is a numeric value
var val = parseInt(eSrc.value);
if (isNaN(val))
{
return AbortEntry("Inserire una quantità.", eSrc);
}
// make sure the value is not negative
if (val <= 0)
{
return AbortEntry("Inserire un numero positivo.", eSrc);
}
}
//-->
</script>
<style type="text/css">
<!--
a:link { color: #808080 }
a:visited { color: #808080 }
a:hover { color: #ff9900 }
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="#808080">
<basefont face="Verdana" size="2">
<table border="0" width="100%" cellpadding="4" cellspacing="1">
<tr>
<td valign="top" nowrap><img border="0" src="images/mcartfree.gif" WIDTH="249" HEIGHT="64"></td>
<td valign="bottom" nowrap align="right"><font face="Verdana" size="1"> </font></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#666666" height="20" align="left" valign="middle" nowrap colspan="4"> <font color="#FFFFFF" face="Century Gothic" size="1"><b>
Home |
<span style="color: #FFFFFF">info</span> | <a href="reviewOrder.asp" style="text-decoration: none"><span style="color: #FFFFFF">Carrello</span></a> | <a href="search.asp" style="color:#FFFFFF;text-decoration:none;">Cerca</a></b></font></td>
</tr>
</table>
<hr color="#CCCCCC" size="1" noshade>
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" width="625">
<tr>
<td width="128" valign="top" align="center">
<table border="0" cellspacing="4" cellpadding="4" width="125">
<tr>
<td width="128" bgcolor="#FFFFFF"><b><i>
<font face="Arial" color="#FF9900">Offerte</font></i></b><br><br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="39%">
<img border="0" src="cellulari/8310offerta.jpg"></td>
<td width="61%"><font size="1">
Nokia 8310<br>? 155,00*</font></td>
</tr>
</table>
<p><a href="mailto:postmaster@cellulandiakr.com"><font size="2"><b>Contatti</b></font></a><br>
</td>
</tr>
</table>
<td width="1" bgcolor="#000000"></td>
<td align="left" valign="top">
<table border="0" cellspacing="2" cellpadding="2"><tr><td>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConString
Set rsProdInfo = Conn.Execute("SELECT * FROM " & _
"prodotti where Codice_prodotto = " &intProdID)
if rsProdInfo.EOF then
Response.Write "Questo prodotto " &intProdID & _
" non esiste."
else
strName = rsProdInfo("Nome")
strDesc = rsProdInfo("Descrizione")
strImage = rsProdInfo("Immagine")
intPrice = rsProdInfo("Prezzo")
%>
<p><font face="Verdana" size="2"><%= strName %></font></p>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><img src="<%= strImage %>" align="left">
<td><font face="Verdana" size="2"> <%= strDesc %></font></td>
</tr>
<tr>
<td><font face="Verdana" size="2">Prezzo: ? <font face="Verdana" size="2"><%= formatNumber(intPrice, 2) %></font></td>
</tr>
</table>
<form action="addToCart.asp" method="post" id="form1" name="form1">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><font face="Verdana" size="2"><b>
<input type="hidden" name="intProdID" value="<%= intProdID %>">Aggiungi
<input type="text" size="3" name="intQuant" value="1" onChange="HandleError(this)"> all'ordine.</b>
<input type="submit" value="Aggiungi" id="submit1" name="submit1">
<br><br><br><a href="reviewOrder.asp" OnMouseOver="test3.src='images/btnDown_ck.gif'" OnMouseOut="test3.src='images/btnUp_ck.gif'"><img SRC="images/btnUp_ck.gif" BORDER="0" NAME="test3" WIDTH="264" HEIGHT="20"></a></font></td>
</tr>
</table></form>
<%
end if
rsProdInfo.Close
set rsProdInfo = Nothing
Conn.Close
set Conn = Nothing
%>
</td></tr></table>
</td></tr></table>
<hr color="#CCCCCC" size="1" noshade>
<table border="0" cellpadding="0" cellspacing="6" width="100%">
<tr>
<td colspan="3" valign="top"><font face="Verdana, Arial, Helvetica" size="1">
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%A, %d %B %Y %H.%M" --> <br>
<a href="mailto:massimilianopacifico@tiscali.it">Webmaster</a></font></td>
<td colspan="3" align="right" valign="TOP">
<img src="images/m2power.gif" border="0" WIDTH="107" HEIGHT="28"></td></tr></table></body></html>
PENSO CHE SIA GIUSTA COSì LA CONNESSIONE NON DOVREBBE ESSERCI BISOGNO DI ALTRO. E' PER QUESTO CHE NON CAPISCO L'ERRORE MA SICURAMENTE MI STO SBAGLIANDO, ME LO AUGURO.
AIUTAMI!!!!!!!!!!