Salve a tutti, sto provando ad utilizzare la componente server Dundas Upload (qui oppure qui) utilizzando il codice d'esempio che danno a questa pagina. Ho creato le due pagine come da tutorial, e pure il Database Access. Il problema é che i files vengono caricati correttamente nella cartella che ho definito ma NON nel database . Qualcuno sa aiutarmi?
Grazie! :adhone:
Qua sotto posto il mio codice.
<%@Language=VBScript%>
<%
On Error Resume Next
Set objUpload = Server.CreateObject("Dundas.Upload.2")
objUpload.Save "C:\Inetpub\wwwroot\dundas\files"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "MyDSN"
objRS.Open "Test", objConn, adOpenDynamic, adLockOptimistic, adCmdTableDirect
For Each objUploadedFile In objUpload.Files
If InStr(1,objUploadedFile.ContentType,"image") Then
objRS.AddNew
objRS("MyBLOB") = objUploadedFile.Binary
End If
Next
objRS.Update
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
Set objUpload = Nothing
%>
<html>
<head>
<title>Documento senza titolo</title>
</head>
<body>
</body>
</html>

Rispondi quotando
