Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/04/2005, 12:14
Avatar de pablinweb
pablinweb
 
Fecha de Ingreso: julio-2003
Mensajes: 283
Antigüedad: 21 años, 9 meses
Puntos: 0
Prueba así
Código:
<%
Response.Buffer=TRUE

id = Request.Querystring("id") 

if id <>"" then

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&Server.MapPath("pcmstore.mdb")&";"

strsql = "SELECT * FROM pcm_productos WHERE id = '" & id & "'" 

Set rs = Server.CreateObject("ADODB.RecordSet")
RS.open strsql, oConn, 3, 3

if rs.eof then
    rs.AddNew
    rs("clicks")= 1
    rs.update
else
    rs("clicks")=rs("clicks")+1
    rs.update
end if 

rs.Close
set rs=nothing
oConn.Close
response.redirect url
end if
%>
y verifica que los campos:
producto (texto)
descripcion (texto)
url (texto)
votos (numerico)
total_votos (numerico)
Permitan valores nulos o tengan algún valor por defecto.