chiedo aiuto perchč nn riesco a processare l'upload...

il codice che uso č quello qua sotto ma mi viene restituito un errore su Stream.Open

l'errore č il seguente:

Tipo di errore:
ADODB.Stream (0x800A0E79)
L'operazione non č consentita se l'oggetto č aperto.
/provecss/inserimento/upload/upload.asp, line 789

chiedo aiuto perchč non riesco proprio a proseguire..

ciao, simone


<%
' PROCEDURA DI UPLOAD DELLE FOTO GRANDI
dim cnn 'as connection
dim cm 'as command

set cnn = createobject("ADODB.Connection")
set cm = createobject("ADODB.Command")
cnn.connectionstring="Provider=Microsoft.Jet.OLEDB .4.0;Data Source=C:/InetPub/wwwroot/provecss/inserimento/dbbirrenew2.mdb;Persist Security Info=False;"

cnn.open

Dim oUpload
Set oUpload = new cUpload
With oUpload
.EnabledAspUpload = True
.EnabledImageSize = TRUE
.EnabledLog = False
.AutoRename = False ' <--- modificato da me; prima era True
.Overwrite = False

.Load
.UploadOnly "Images"

dim rs 'as recordset

set rs = createobject("ADODB.Recordset")


rs.cursorlocation=3



if Session("quante_foto") = "nophoto" then
rs.open "SELECT * FROM foto_birre ORDER BY ID_foto ASC",cnn ,1, 3

RS.Addnew()
RS("ID_birra") = Session("ID_birra")
RS("url_foto_g") = "http://www.url.it/img/birre/big/00000_00.jpg"
RS("url_foto_p") = "http://www.url.it/img/birre/small/00000_00.jpg"
RS.Update()


end if


if Session("quante_foto") <> "nophoto" then




for i= 1 to cInt(Session("quante_foto"))
While Not .Eof
rs.open "SELECT * FROM foto_birre ORDER BY ID_foto ASC",cnn ,1, 3



If .Files("Height")>=2200 or .Files("Width")>=2350 then
Response.write ("Le dimensioni dell'immagine " &_
.GetFileName() &"
non sono corrette (" &_
.Files("Height") &"x" & .Files("Width") &"): File non caricato
" )

else

.SetPath "img\birre\big\"
.SaveAs(Session("nome_foto" & i))

end if




RS.Addnew()
RS("ID_birra") = Session("ID_birra")
RS("url_foto_g") = "http://www.url.it/img/birre/big/" & Session("nome_foto"& i )
RS("url_foto_p") = "http://www.url.it/img/birre/small/" & Session("nome_foto"& i )
RS.Update()
RS.Close


.Movenext
wend
next


end if


End With
Set oUpload = Nothing

cnn.close