Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/12/2003, 16:38
ciberpata
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago de Compostela
Mensajes: 603
Antigüedad: 21 años, 11 meses
Puntos: 0
ERROR en codigo. Por favor echenme una mano

Tengo dos páginas:
agencias.asp y tarifario_confidencial.asp

En teoría la primera pagina funciona bien (agencias.asp). El problema viene cuando tiene que visualizar la segunda pagina (tarifario_confidencial.asp), porque me da el siguiente error.


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

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id ='.

/tarifario_confidencial.asp, line 45


Este error lo emite cuando se hace click en la maleta de ofertas.

He revisado el código y no consigo ver donde está el error podrían ayudarme???.


Les paso el código:

agencias.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.asp"-->
<%
'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 claseoferta = 'última hora'"
'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 "skiviajes_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 claseoferta = 'Agencias'"
Set Ob_RS=Ob_Command.Execute ()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr bgcolor="#e0e0e0">
<td width="90%"><div align="left"><font color="#003399" size="2" face="Arial, Helvetica, sans-serif"><font size="1">Destino</font></font></div></td>
<td width="10%"><font size="2"><font size="1"><font color="#003399" face="Arial, Helvetica, sans-serif">Oferta</font></font></font></td>
</tr>
<% do until ob_RS.eof %>
<tr align="left" valign="top" bgcolor="#ebf3eb">
<td><font size="1" face="Arial, Helvetica, sans-serif"><img src="images/bala_ultima_hora.gif">&nbsp;<%=Ob_RS("destino")%> <br>
</font>
<td><font size="1" face="Arial, Helvetica, sans-serif"><a href="tarifario_confidencial.asp"

onClick="AbrirVentana('tarifario_confidencial.asp? id=<%=Ob_RS("id")%>', '', 'scrollbars=yes, top=112, left=165, width=500, height=410, resizable=0')" shape="rect" ><img src="images/iconoultimahora.gif" alt="<%=Ob_RS("destino")%>" width="25" height="23" border="0"></a></font></tr>
<% Ob_RS.movenext
loop
Ob_RS.close
Ob_Conn.close
%>
</table>
</body>
</html>
-----------------------------------



tarifario_confidencia.asp
--------------------------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title>Oferta de &uacute;ltima hora</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="0" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<!--#INCLUDE file="ADOVBS.asp"-->
<%
'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 id = " & Request.QueryString("id")
'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 "skiviajes_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 id = " & Request.QueryString("id")
Set Ob_RS=Ob_Command.Execute () %>

<table width="100%" cellpadding="0">
<tr>
<td width="6%" align="left" valign="top"> <div align="center"><img src="images/<%=Ob_RS("precioagencias")%>" width="<%=Ob_RS("precioagenciasancho")%>" height="<%=Ob_RS("precioagenciasalto")%>" align="absmiddle"></div>
<div align="left"></div></td>
</tr>
</table>
</body>
</html>
--------------------------------------

Desde ya muchas gracias a todos.