Ecco, ho fatto come di seguito, e il controllo lo esegue ma:
1) Non uppa l'immagine;
2) Non esegue la stringa sql;
codice:
'Creazione Oggetto di Upload
Dim oUpload
Set oUpload = new cUpload
oUpload.EnabledAspUpload = False
oUpload.AutoRename = False
oUpload.Overwrite = True
oUpload.EnabledImageSize = True
oUpload.EnabledLog = False
oUpload.SetPath "avatar\"
oUpload.Load()
oUpload.UploadOnly "Images"
perm = 1
While Not oUpload.Eof
If oUpload.Files("Height")=>200 or oUpload.Files("Width")=>200 then
big = 1
else
big = 0
end if
oUpload.MoveNext
Wend
If big = 1 Then
response.write "L'immagine ha un peso eccessivo, o forse non rientra nelle misure massima.
File non caricato."
response.end
end if
'Recupero valori form
id = oUpload.Form("id")
avatar = oUpload.Form("avatar")
firma = oUpload.Form("firma")
bg = oUpload.Form("bg")
menu = oUpload.Form("menu")
large = oUpload.Form("large")
avy = oUpload.Form("avy")
'Replace di Bg e Firma
bg = Replace(bg, "<", "<")
bg = Replace(bg, ">", ">")
bg = replace(bg,"'","''")
bg = replace(bg,vbCrLf,"
")
firma = replace(firma,"'","''")
firma = replace(firma,vbCrLf,"
")
'Stop al ciclo
If perm = 0 Then
response.end
end if
'Impostazione di Lrg
lrg = 0
If large = "1" Then lrg = 1
'Se seleziono l'avatar allora salvo il file
If avy = 2 and Not oUpload.EOF Then
nym = "av" & id
oUpload.SaveAs nym & "." & oUpload.Files("Ext")
avatar = "avatar/" & nym & "." & oUpload.Files("Ext")
end if
'Inserimento nel Database
strSQL = "UPDATE info SET avatar = '"&avatar&"', firma = '"&firma&"', bg = '"&bg&"', menu = "&menu&", large="&lrg&" WHERE id ="&id
Conn.Execute strSQL %>