Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/01/2008, 08:30
rgarcia1019
 
Fecha de Ingreso: enero-2008
Mensajes: 3
Antigüedad: 17 años, 3 meses
Puntos: 0
Como subo una imagen desde base de datos

y que dicha imagen cambie segun el campo, teniendo un solo picturebox en la página

el codigo es el siguiente pero siempre me aparece el siguiente error
Microsoft JET Database Engine error '80040e14'

The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

/includes/agenda1.asp, line 8

El codigo es el siguiente
<%for x=2 to 6
Sql="SELECT agenda.id, agenda.imagen, agenda.tipo, [agenda-texto].titulo, [agenda-texto].copete, tipo_agenda.tipo,"&_
"FROM union_agenda INNER JOIN ((idiomas INNER JOIN (agenda INNER JOIN [agenda-texto] ON agenda.id = [agenda-texto].noticia) ON idiomas.id = [agenda-texto].idioma) INNER JOIN tipo_agenda ON idiomas.id = tipo_agenda.idioma) ON (union_agenda.[id-tipo] = tipo_agenda.[id-tipo]) AND (union_agenda.[id-tipo] = agenda.tipo) "&_
"WHERE ((([agenda-texto].idioma)="&request("lang")&") AND ((union_agenda.orden)="&x&")) "&_
"ORDER BY agenda.fechainicio DESC;"

set rs_agenda = server.CreateObject("ADODB.Recordset")
rs_agenda.open Sql,conn,1,3

%>
<%if not rs_agenda.eof then%>
<table cellpadding="2" cellspacing="2" border="0" width="210">
<tr>
<td height="25" background="Imagenes/menu/agenda/bannertitulos.gif">
<strong class="fuente_chica" style="color:#FFFFFF;">&nbsp;&nbsp;&nbsp;<%=ucase( rs_agenda("tipo_agenda.tipo"))%></strong>
</td>
</tr>
<tr>
<td height="100"><div class="agenda-admin" style="border-color:40A7DF; background-color:F5F7FF;">
<strong><%=ucase(rs_agenda("titulo"))%></strong><p></p>
<%if rs_agenda("imagen") <> "" and rs_agenda("imagen") <> " " then%>
<img class="agenda-admin" src="imagenes/agenda/<%=rs_agenda("imagen")%>" width="60" height="60" align="left" hspace="2" vspace="2" />
<%else%>
<img class="agenda-admin" src="imagenes/agenda/no_dis.jpg" width="60" height="60" align="left" hspace="2" vspace="2" />
<%end if%>
<%=rs_agenda("copete")%>
<p>
<a href="agenda.asp?id=<%=Rs_agenda("id")%>&tipo=<%=r s_agenda("agenda.tipo")%>&lang=<%=request("lang")% >"><img src="Imagenes/menu/agenda/+nota.gif" border="0" title="Ampliar noticia" /></a>
<a href="agenda.asp?tipo=<%=rs_agenda("agenda.tipo")% >&lang=<%=request("lang")%>"><img src="Imagenes/menu/agenda/+info.gif" border="0" title="Ver mas noticias" /></a>
</p>
</div></td>
</tr>
<tr> <td width="200" height="37">&nbsp;</td>
</tr>
</table>
<a
{este es la imagen que tendria que ir cambiando}} <img class="agenda-admin" src="imagenes/agenda/<%=rs_agenda("tipo.agenda.img")%>" />



</a>
<%end if%>
<%next
rs_agenda.close
set rs_agenda=nothing%>

Última edición por rgarcia1019; 23/01/2008 a las 08:37 Razón: AYUDA URGENTE(TEMA SIMPLE..CREO)