Io ho una pagina con una serie di thumbs cliccando sulle quali si apre una seconda pagina contenente l'ingrandimento della thumb. Nella pagina contenente l'immagine ingrandita c'è un link per tornare alla pagina contenente le thumbs.
Ovviamente tutte le thumbs sono prelevate da una database e ovviamente hanno un indice contatore univoco.
L'ingrandimento avviene senza alcun problema ma, quando nella pagina con l'immagine ingrandita clicco sul link per tornare alla pagina con le thumbs, mi da l'errore:
------------------------------------------
ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/GalleriaPortfolio/Foto.asp, line 0
------------------------------------------

Ho letto tutti i threads riguardanti questo errore, sia in questo forum che in altri siti, ma le soluzioni che riportavano (soprattutto quella di verificare i record vuoti) non evitavano la generazione di questo errore. Ovviamente la tabella contiene dei record da visualizzare.

Vi posto il codice asp relativo alla gestione del recordset di entrambe le pagine in questione.

-- PAGINA DELLE THUMBS --
codice:
<%@LANGUAGE="VBSCRIPT"%>

<%
Dim rstElencoFoto__MMColParam
rstElencoFoto__MMColParam = "1"
If (Request.QueryString("IdPortfolio") <> "") Then 
  rstElencoFoto__MMColParam = Request.QueryString("IdPortfolio")
End If
%>
<%
Dim rstElencoFoto
Dim rstElencoFoto_cmd
Dim rstElencoFoto_numRows

Set rstElencoFoto_cmd = Server.CreateObject ("ADODB.Command")
rstElencoFoto_cmd.ActiveConnection = MM_conn_databaseMP_STRING
rstElencoFoto_cmd.CommandText = "SELECT * FROM tblFotoPortfolio WHERE IdPortfolio = ?" 
rstElencoFoto_cmd.Prepared = true
rstElencoFoto_cmd.Parameters.Append rstElencoFoto_cmd.CreateParameter("param1", 5, 1, -1, rstElencoFoto__MMColParam) ' adDouble

Set rstElencoFoto = rstElencoFoto_cmd.Execute
rstElencoFoto_numRows = 0
%>

<%
if not rstElencoFoto.EOF then
  do while not rstElencoFoto.EOF
%>
">[img]<%=(rstElencoFoto.Fields.Item([/img]" align="middle" />
<%
     rstElencoFoto.MoveNext()
  Loop
end if
%>
-- PAGINA INGRANDIMENTO --
codice:
<%@LANGUAGE="VBSCRIPT"%>

<%
Dim rstIngrandimentoFoto__MMColParam
rstIngrandimentoFoto__MMColParam = "1"
If (Request.QueryString("IdFoto") <> "") Then 
  rstIngrandimentoFoto__MMColParam = Request.QueryString("IdFoto")
  session("IdLavoro") = Request.QueryString("IdFoto")
End If
%>
<%
Dim rstIngrandimentoFoto
Dim rstIngrandimentoFoto_cmd
Dim rstIngrandimentoFoto_numRows

Set rstIngrandimentoFoto_cmd = Server.CreateObject ("ADODB.Command")
rstIngrandimentoFoto_cmd.ActiveConnection = MM_conn_databaseMP_STRING
rstIngrandimentoFoto_cmd.CommandText = "SELECT ImmagineGrande FROM tblFotoPortfolio WHERE IdFoto = ?" 
rstIngrandimentoFoto_cmd.Prepared = true
rstIngrandimentoFoto_cmd.Parameters.Append rstIngrandimentoFoto_cmd.CreateParameter("param1", 5, 1, -1, rstIngrandimentoFoto__MMColParam) ' adDouble

Set rstIngrandimentoFoto = rstIngrandimentoFoto_cmd.Execute
rstIngrandimentoFoto_numRows = 0
%>

<div align="center">[img]<%=(rstIngrandimentoFoto.Fields.Item([/img]" /></div>
Mi è sorto il dubbio che tornando dalla pagina dell'ingrandimento a quella delle thumbs andasse perso il valore di Request.QueryString("IdFoto"), che è il contatore identificativo della foto ma, anche assegnando tale valore a una variabile mi si presenta sempre lo stesso problema.

Grazie per qualsiasi suggerimento vogliate darmi.