Consejería para la Igualdad y Bienestar Social
Inicio
Quienes somos
La Prescripción de Heroína
Legislación
Experiencias
Beneficiarios del Proyecto
Estudios y Documentos
Direcciones de Interés
noticia  >> Noticias  >> Home

<% dim oconn,rs,t_sql,connstr dim t_condicion,t_hay_condicion,t_tablas dim t_clave t_clave = request.querystring ("clave") t_condicion = " where " t_hay_condicion=False t_Tablas = " noticias " if not t_clave= "" then if t_hay_condicion then t_condicion = t_condicion + " and " end if t_condicion = T_condicion + " clave = "+t_clave t_hay_condicion=True end if Set oConn = Server.CreateObject("ADODB.connection") connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("noticias.mdb") oConn.Open ConnStr 'Has to be a serverside cursor. set RS = server.CREATEOBJECT("ADOR.Recordset") 'Rs.cursortype = 1 'adOpenKeyset Rs.cursorlocation = 2 'adUseServer 'Rs.locktype = 3 'adLockOptimistic t_sql = "select * from " + t_tablas if t_hay_condicion then t_sql = t_sql + t_condicion end if Rs.OPEN t_sql,oConn %>
<% while not rs.EOF%>
<%=trim(rs("Titulo"))%> 
Origen:<%=trim(rs("origen")) + " Fecha:" + trim (rs("fecha"))%> 
Resumen:<%=trim(rs("Resumen"))%> 
">Noticia completa  

<%rs.MoveNext wend %>
<%rs.close set rs= Nothing oconn.close set oconn = Nothing %>