U_goldman... he probado hasta aburrirme y no se porque me tira error este código.... he hecho todo lo que me has dicho pero no quiere no se porque...
Código:
<%
'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.nombre_categoria, b.id_producto, b.categoria, b.imagen, b.nombre, b.precio From categorias a INNER JOIN productos b ON a.id_categoria = b.categoria Where b.categoria = " & categoria & ""
'Ejecución de la orden
Set rs = Conn.Execute(sql) ' linea 38
%>
<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
%>
<tr>
<td width="100%"><a href="verdetalle.asp?id=<% = rs("id_categoria") %>"><% = rs("nombre_categoria") %></a></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
</td>
<td width="50%">
<%
Do While Not rs.Eof
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="33%"><a herf="verdetalle.asp?id=<% = rs("id_producto") %>"><img src="<% = rs("imagen") %>"></a></td>
<td width="33%"><a herf="verdetalle.asp?id=<% = rs("id_producto") %>"><% = rs("nombre") %></a></td>
<td width="34%"><% = rs("precio") %></td>
</tr>
</table>
<%
rs.MoveNext
Loop
%>
</td>
</tr>
</table>
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
no se porque.... he probado cambiando todo lo que he podido pero = no quiere