modificando un poco el codigo me tira un error... dejo el código actual y el error
Código:
<% @ language="VBscript" %>
<% Option Explicit %>
<html>
<head>
<title>Catálogo on-line</title>
</head>
<body>
<%
'Declarar Variables
Dim Conn
Dim sql
Dim rs
Dim categoria
'Rescate de valores por URL
categoria = Request.Querystring("id")
'Se pone una condición
if categoria = "" Then
categoria = 1
end if
'Instanciar y abrir la conección
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("catalogo.mdb"))
'Creación de la sentencia SQL correspondiente
sql="Select a.id_categoria, a.categoria as categorias, b.id_producto, b.categoria as productos, b.imagen, b.nombre, b.precio From categorias a INNER JOIN productos b ON a.categoria = b.categoria Where b.categoria = " & categoria & ""
'Ejecución de la orden
Set rs = Conn.Execute(sql)
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">Categorías</td>
</tr>
<%
Do While Not rs.Eof
'Esto es lo que me dijo Neuron_376
categorias = categorias & rs("aCategoriaCategorias")
%>
<tr>
<td width="100%"><a href="verdetalle.asp?id=<% = rs("id_categoria") %>"><% = rs("categoria") %></a></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
</td>
<td width="50%">
<%
Do While Not rs.Eof
'Esto es lo que me dijo Neuron_376 (¿pero como puedo hacer cuando quiero visualisar mas de un campo?)
articulos = articulos & rs("bimagenproductos")
'Se pone una condición
if categoria = "" Then
Response.Write (" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">")
Response.Write (" <tr>")
Response.Write (" <td width=""100%"">no hay categorias seleccionadas</td>")
Response.Write (" </tr>")
Response.Write (" </table>")
else %>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="33%"><a herf="verdetalle.asp?id=<% = rs("id") %>"><img src="<% = rs("imagen") %>"></a></td>
<td width="33%"><a herf="verdetalle.asp?id=<% = rs("id") %>"><% = rs("nombre") %></a></td>
<td width="34%"><% = rs("precio") %></td>
</tr>
</table>
<%
end if
rs.MoveNext
Loop
%>
</td>
</tr>
</table>
y el error es:
Microsoft JET Database Engine
error '80040e10' No se han especificado valores para algunos de los parámetros requeridos /pruebas/catalogo/catalogo.asp, line 38
y no entiendo porque es el erro que me esta tirando problemas.... saludos