Wednesday, 18 November 2009

ASP File Upload - ADODB.Stream error '800a0bbc' Write to file failed

I have been using a useful ASP module to upload files to web servers - Check out http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8525&lngWId=4

Recently one implementation started reporting errors - - ADODB.Stream error '800a0bbc' Write to file failed.

It appears that Vista and IE7 and IE8 do not pass over the full path string of the file to be uploaded.

To fix the problem - in the file named clsField.asp change

' Parse File Name
If Not InStrRev(pstrPath, "\") = 0 Then
FileName = Mid(pstrPath, InStrRev(pstrPath, "\") + 1)
End If

to
' Parse File Name
If Not InStrRev(pstrPath, "\") = 0 Then
FileName = Mid(pstrPath, InStrRev(pstrPath, "\") + 1)
Else
FileName = pstrPath
End If

No comments: