I am using the method illustrated on this site http://www.15seconds.com/issue/990723.htm to upload multiple files
However, I am finding that I need to run it once before it works.
i.e. the first time, the Server.CreateObject makes the dll and says
"The remote procedure call failed and did not execute." or
"document contains no data"
Why is the DLL not getting loaded straight away?
The second time it works fine, presumably because the dll is loaded in memory.
I have pasted the ASP page below.
VB Code:
<%@ Language=VBScript %> <% Option explicit Response.Buffer = True On Error Resume Next If Request.ServerVariables("REQUEST_METHOD") = "POST" Then Dim objUpload Dim lngMaxFileBytes Dim strUploadPath Dim varResult lngMaxFileBytes = 10000 strUploadPath = "c:\inetpub\wwwroot\upload\" Set objUpload = Server.CreateObject("pjUploadFile.clsUpload") If Err.Number <> 0 Then Response.Write "The component wasn’t registered" Else varResult = objUpload.DoUpload (lngMaxFileBytes, strUploadPath) Set objUpload = Nothing 'Write the result Dim i For i = 0 to UBound(varResult,1) Response.Write varResult(i,0) & " : " & varResult(i,1) & "<br>" Next End If End If %>




Reply With Quote