Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/02/2002, 07:50
foso
 
Fecha de Ingreso: junio-2001
Mensajes: 38
Antigüedad: 23 años, 10 meses
Puntos: 0
Mas problemas con registros

Este es otro problema diferente al anterior. Tengo el siguiente código

Set conex = Server.CreateObject("ADODB.Connection")
Set reg = Server.CreateObject("ADODB.RecordSet")
Set dat = Server.CreateObject("ADODB.RecordSet")

conex.Open "entrar"
sql = "SELECT * FROM Tablero"

reg.open sql,conex,0,1

Do while NOT reg.Eof

if Not reg.Eof then
rgsql = "SELECT * from CENTRALES WHERE CENTRALES.Pieza='"& reg("Pieza") & "'"
dat.open rgsql,conex

else

end if

reg.movenext
loop


Y me da el siguiente error:
Error Type:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.

He probado a poner dos conexiones diferentes a la DB pero aun asi sigue dando el mismo problema.
Alguien sabe como resolverlo o dar alguna ideea ?

Muchas gracias