Perchè il seguente codice da l'errore che segue?
<%
Sub DisplayPhoto()
CreateTopTable "Immagini", GetTranslation("LANG_LISTEN_TO_PHOTO")
Dim oCn, oRs, rSQL, idMIN, idMAX, idSELECT, iPath
on error resume next
Set oCn = DBConnexion(DB_ABSOLUTEIG)
rSQL = "SELECT min(imageid) as MIN, max(imageid) as MAX FROM xlaAIGimages where iValid = 1"
Set oRs = DBRecordSet(oCn, rSQL)
idMIN = Server.URLEncode(oRs("MIN"))
idMAX = Server.URLEncode(oRs("MAX"))
oRs.Close
set oRs = Nothing
Randomize
idSELECT = Int((idMAX-idMIN) * Rnd) + idMIN
rSQL = "SELECT * FROM xlaAIGimages where status = 1 and imageid >= " & idSELECT
Set oRs = DBRecordSet(oCn, rSQL)
iPath = oRs("iSourceSmall")
Response.Write ("<table class=""immagini"" align=""center"" border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">") & vbCRLF
Response.Write("<tr border=""0"">") & vbCRLF
Response.Write " <td align=""center"" valign=""middle"" >" & vbCRLF
if iPath <> "" then
Response.Write "[img][/img]"
Response.Write "<div class=""imgtitle"">" & oRs("imagename") & "(" & oRs("hits") & ")"& "</div>"
End if
Response.Write " </tr></td>" & vbCRLF
Response.Write " </table>" & vbCRLF
oRs.Close
set oRs = Nothing
oCn.Close
set oCn = Nothing
CreateBottomTable ""
End Sub
%>
ErroreSQL -2147467259: [Microsoft][Driver ODBC Microsoft Access]Errore generale. Impossibile aprire la chiave 'Temporary (volatile) Jet DSN for process 0xd8c Thread 0x9dc DBC 0x1de4014 Jet' del Registro di sistema.
Connection String : DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\miosito.com\mdb-database\
ErroreSQL 3704: L'operazione non è consentita se l'oggetto è chiuso.
SQL : SELECT min(imageid) as MIN, max(imageid) as MAX FROM xlaAIGimages where iValid = 1
ErroreSQL 3704: L'operazione non è consentita se l'oggetto è chiuso.
SQL : SELECT * FROM xlaAIGimages where status = 1 and imageid >= 0