Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/02/2008, 10:12
rene_bustos
 
Fecha de Ingreso: octubre-2007
Mensajes: 76
Antigüedad: 17 años, 8 meses
Puntos: 1
De acuerdo Re: ayuda error ADODB.Recordset error '800a0cb3'

Que onda? mia estube chekando el codigo y o modifique espero y te funcione saludos
cualquier cosa para eso estamos.
saludos

Código:
<%
 link = request.querystring("link")
 if link = "" then
 link = -1
 end if
 if link <> -1 then
		sqltxt="select * from clicks where url='"&link&"'"
		Set Conn = Server.CreateObject("ADODB.Connection")
		Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("contadordescargas.mdb"))
		set rs=createobject("ADODB.Recordset")
		rs.open sqltxt, conn, 3
		if rs.eof then
			sSQl ="INSERT INTO clicks (url,cantidad) VALUES ('"&link&"',1)"
			conn.execute(sSQL)
			   'rs.addnew
	'		   rs("url") = link
	'		   rs("cantidad") = 1
	'		   rs.update
		 else
		 	sSQL="UPDATE clicks SET cantidad=" & rs("cantidad")+1
			conn.execute(sSQL)
		   'rs("cantidad") = rs("cantidad")+1
'		   rs.update
		end if
		 rs.close
 		set rs=nothing
		Conn.Close
 		response.redirect link
 else%>
	<title>contadordescargas</title>
 	<center>No se ha especificado ningún archivo o enlace<br>
 	<a href="javascript:history.go(-1)">Atrás</a>
 	</center>
 <%end if%>