Hi Faisal,
I am working on a ASP project using SQL Server 2005 and i used your loader, insert, file codes to insert binary data into the database. The problem is i want to insert sound file (mp3 and wav) into my database. Such files are less than 1MB. Other images and files are inserted properly except from mp3, wav or other sound file format. The following error is generated when i try insert sound file:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
/loader.asp, line 30
Public Sub Initialize
If Request.TotalBytes > 0 Then
Dim binData
binData = Request.BinaryRead (Request.TotalBytes) 'line 30
getData binData
End If
End Sub
On the other hand at certain times, when i want to upload file i receive the floowing error:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'MidB'
/loader.asp, line 135
the line in question is:
Private Sub getData(rawData)
Dim separator
separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) 'line 135
A third issue i have it's when displaying files into the browser.Ultimately i would like the user to be prompted a Download dialog box with save as option. Using your file.asp code here's the error i get:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/file.asp, line 28
here's the line in question:
Response.AddHeader "Content-Disposition", "filename="&_
rs("message_filename")
Would you please assist me, i'm so stuck by that.
Thanks