Hola a todos, tengo un problema pero no veo cual. Tengo este código y me sale un error:
Tipo de error:
ADODB.Recordset (0x800A0E78)
La operación no está permitida si el objeto está cerrado.
/gce25-01-07/centro.asp, línea 42
Y la verdad no veo donde está cerrado el objeto.
Me podeis hechar una mano. Gracias!!!!
<!--#include file="inc_conecnew.asp"-->
<%
cod_activi=request.QueryString("cod")//recogo el código de actividad que envia inc/menuizd.asp
//consulta a tabla gce_empresas
sqlc ="select * from gce_empresas where EMP_ACT='"&cod_activi&"'"
Set rsc = Server.CreateObject("ADODB.Recordset")
rsc.Open sqlc, my_conn, 3, 3
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>empresas</title>
<!--#include file="tags.asp"-->
<link href="estilo.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#C9C7CF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"><center>
<div id="contenedor">
<table width="750" border="0" style="border-collapse: collapse" bordercolor="#ECA581" bgcolor="#FFFFFF" cellpadding="3">
<tr>
<td><!--#include file="top.asp"--></td>
</tr>
<div id="cuerpo" align="center">
<tr>
<td><!--#include file="menuizd.asp"--></td>
<td valign="top">
<div id="texto">
<table border="1" cellspacing="0" width="100%" style="border-collapse: collapse" bordercolor="#ECA581" cellpadding="3">
<%
if cod_activi="8" then
// si el código es este tiene que sacar datos en word poque no están en la bd
response.Redirect("index.asp")//pagina que sea
else
if not rsc.EOF then
cuantos = cuantos +1
rsc.MoveFirst
do while not rsc.eof
response.Write("<tr>")
response.Write("<td><b>"& rsc("EMP_NOM")&"</b><br>")
response.Write(""&rsc("EMP_DIR")&"<br>")
response.Write(""&rsc("EMP_CP")&" "&rsc("EMP_ POB")&"<br>")
response.Write("("&rsc("EMP_PRO")&") "&rsc("E MP_PAI")&"<br>")
response.Write( "<a HREF='http://"&rsc("EMP_WEB")&"' target='_blank'>ver web</a>")
response.Write("<div align='right'><a HREF='frm_editar.asp?cod_emp="&rsc("EMP_COD")&"&co d_act="&cod_activi&"'>Modificar</a></div></td>")
rsc.MoveNext
cuantos = cuantos +1
loop
response.Write("</tr>")
end if
end if
rsc.Close
%>
</table>
</div><!--fin de texto-->
<p>
</td>
<td valign="top" width="135" align="center">
<table border="0" width="100%" cellspacing="0" align="center">
<tr>
<td><!--#include file="articulos.asp"--></td>
</tr>
<!--#include file="menuder.asp"-->
</table>
</td>
</tr>
</div><!--fin de cuerpo-->
</table>
</div><!--fin de contenedor-->
</body>
</html>