Foros del Web » Programando para Internet » ASP Clásico »

Ayuda Urgente por Presentación de web site mañana

Estas en el tema de Ayuda Urgente por Presentación de web site mañana en el foro de ASP Clásico en Foros del Web. Saludos al foro: Tengo una pagina que se llama: "generartabla_ultima_hora.asp" que devuelve un listado de una db en forma de icono. Al pulsar sobre cada ...
  #1 (permalink)  
Antiguo 14/07/2003, 12:06
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago de Compostela
Mensajes: 603
Antigüedad: 21 años
Puntos: 0
Ayuda Urgente por Presentación de web site mañana

Saludos al foro:
Tengo una pagina que se llama: "generartabla_ultima_hora.asp" que devuelve un listado de una db en forma de icono. Al pulsar sobre cada icono debe ir a la página web: "ficha_ultima_hora.asp" y visualizar una ficha con los datos de la oferta.
Es aquí donde me da el error siguiente:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][Controlador ODBC Microsoft Access] Error de sintaxis (falta operador) en la expresión de consulta 'id ='.

/ficha_hotel.asp, line 30

Os mando el codigo de las paginas por si veis el error:

codigo generartabla_ultima_hora.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

<SCRIPT LANGUAGE="JavaScript">
<!--
function AbrirVentana (theURL, winName, features)
{
window.open (theURL, winName, features);
}
-->
</SCRIPT>


</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<p>
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
'Set Ob_Conn= Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "DSN=clubviajesoferta.com.access"
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText
'Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%'Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
Set Ob_Conn = Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText
Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%Set Ob_RS=Ob_Command.Execute ()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr bgcolor="#e0e0e0">
<td width="100%"><div align="left"><font size="2"><font size="1"><font size="1"><font face="Arial, Helvetica, sans-serif"></font></font></font></font></div></td>
</tr>
<% do until ob_RS.eof %>
<tr align="left" valign="top" bgcolor="#ebf3eb">
<td><font size="1" face="Arial, Helvetica, sans-serif"><a href="ofertas_ultima_hora.asp"

onClick="AbrirVentana('ficha_hotel.asp?fotoultimah ora=<%=Ob_RS("fotoultimahora")%>', '', 'top=112, left=165, width=627, height=350, resizable=0')" shape="rect" ><img src="images/<%=Ob_RS("fotoultimahora")%>" alt="Información de última hora" width="22" height="22" border="0"></a>
</font> </tr>
<% Ob_RS.movenext
loop
Ob_RS.close
Ob_Conn.close
%>
</table>
</body>
</html>
--------

codigo ficha_ultima_hora.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title>Informaci&oacute;n sobre el Hotel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
'Set Ob_Conn= Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "DSN=clubviajesoferta.com.access"
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText%>
<%'Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")&>
'<%Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
Set Ob_Conn = Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText
<%Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")%>
<%Set Ob_RS=Ob_Command.Execute () %>
<table width="100%" cellpadding="2">
<tr>
<td width="6%" align="left" valign="top"> <div align="left"><img src="images/<%=Ob_RS("fotoultimahora")%>" width="<%=Ob_RS("fotoultimahoraancho")%>" height="<%=Ob_RS("fotoultimahoraalto")%>" align="top"></div>
<div align="left"></div></td>
</tr>
</table>
</body>
</html>


Gracias a todos
  #2 (permalink)  
Antiguo 14/07/2003, 12:25
Avatar de xBlaze  
Fecha de Ingreso: julio-2002
Ubicación: Lemuria
Mensajes: 87
Antigüedad: 21 años, 10 meses
Puntos: 0
Hola: pues ya le di una checada a tu codigo y no le veo por ningun lado un 'id =' no se si cambiaste el nombre de la variable o algo asi, tambien te recomiendo que quites todo el codigo que tienes en comentario, lo veo inutil, pues nadamas confunde.

Aparte, comentas de un error en un archivo llamado 'ficha_hotel.asp' y solo pones el codigo de 'generartabla_ultima_hora.asp' y de 'ficha_ultima_hora.asp' tal vez si pones el de ficha_hotel.asp te podamos ayudar.

Hasta luego
__________________
Darth xBlaze
Gerente de Sistemas
Arisoft
  #3 (permalink)  
Antiguo 14/07/2003, 12:28
Avatar de Saruman  
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 21 años
Puntos: 5
lo que dijo xBlaze es totalmente cierto... debes colocar el codigo de la pagina
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.
  #4 (permalink)  
Antiguo 14/07/2003, 15:16
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago de Compostela
Mensajes: 603
Antigüedad: 21 años
Puntos: 0
Saludos al foro:
Perdon ante todo por el error, pero era eso: un error. Ya lo he corregido, ahora la pagina no me da ningun error al ejecutarse, es decir no funciona, pero no me devuelve ningún mensaje de error.
Tengo una pagina que se llama: "generartabla_ultima_hora.asp" que devuelve un listado de una db en forma de icono. Al pulsar sobre cada icono debe ir a la página web: "ficha_ultima_hora.asp" y visualizar una ficha con los datos de la oferta.


Os mando el codigo de las paginas por si veis el error:


codigo generartabla_ultima_hora.asp
------------------------------------------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

<SCRIPT LANGUAGE="JavaScript">
<!--
function AbrirVentana (theURL, winName, features)
{
window.open (theURL, winName, features);
}
-->
</SCRIPT>


</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<p>
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
Set Ob_Conn= Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "DSN=clubviajesoferta.com.access"
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText
Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
'Set Ob_Conn = Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText
'Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%'Set Ob_RS=Ob_Command.Execute ()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr bgcolor="#e0e0e0">
<td width="100%"><div align="left"><font size="2"><font size="1"><font size="1"><font face="Arial, Helvetica, sans-serif"></font></font></font></font></div></td>
</tr>
<% do until ob_RS.eof %>
<tr align="left" valign="top" bgcolor="#ebf3eb">
<td><font size="1" face="Arial, Helvetica, sans-serif"><a href="ofertas_ultima_hora.asp"

onClick="AbrirVentana('ficha_ultima_hora.asp?fotou ltimahora=<%=Ob_RS("fotoultimahora")%>', '', 'top=112, left=165, width=627, height=350, resizable=0')" shape="rect" ><img src="images/<%=Ob_RS("fotoultimahora")%>" alt="Información de última hora" width="22" height="22" border="0"></a>
</font> </tr>
<% Ob_RS.movenext
loop
Ob_RS.close
Ob_Conn.close
%>
</table>
</body>
</html>
------------------------------------------------


Codigo de la pagina ficha_ultima_hora.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title>Informaci&oacute;n sobre el Hotel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
Set Ob_Conn= Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "DSN=clubviajesoferta.com.access"
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText%>
<%Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")
Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
'Set Ob_Conn = Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText
'Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")
'Set Ob_RS=Ob_Command.Execute () %>
<table width="100%" cellpadding="2">
<tr>
<td width="6%" align="left" valign="top"> <div align="left"><img src="images/<%=Ob_RS("fotoultimahora")%>" width="<%=Ob_RS("fotoultimahoraancho")%>" height="<%=Ob_RS("fotoultimahoraalto")%>" align="top"></div>
<div align="left"></div></td>
</tr>
</table>
</body>
</html>
--------------------------------------------------------

Gracias a todos, por todo
  #5 (permalink)  
Antiguo 15/07/2003, 10:50
Avatar de xBlaze  
Fecha de Ingreso: julio-2002
Ubicación: Lemuria
Mensajes: 87
Antigüedad: 21 años, 10 meses
Puntos: 0
Puedes tratar antes del ciclo Do Until, el hacer un If, preguntando por ob_RS para ver si se encuentra en el Fin de Archivo:

IF ob_RS.EOF Then
Response.Write("Se encuentra en el fin de archivo por lo tanto no encontro ningun registro con la consulta solicitada")
Else
Response.Write("No encontro el fin de archivo, asi que aqui ejecuta el Do Until")
End If

Es posible que no encuentre ningun campo y por lo mismo no te presente nada, ahora si que si el codigo no da ningun error es cosa de ir viendo que valores tiene cada variable y cada objeto para saber el porque no esta arrojando nada.

Hasta luego
__________________
Darth xBlaze
Gerente de Sistemas
Arisoft
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:41.