|
-
September 30th, 2008, 07:39 AM
#1
Writing binary files in server [ASP]
Hello All,
I got a code snippet for writing binary files in (iis) server.
Code:
Function SaveBinaryData(FileName, ByteArray)
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = 1
BinaryStream.Open
BinaryStream.Write ByteArray
BinaryStream.SaveToFile FileName, 2
End Function
filename = request.querystring("filename")
root = Server.MapPath("/test")
Response.write( root & "/" & filename)
SaveBinaryData root & "/" & filename,"ddddddddd"
But this throws error "ADODB.Stream (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." at the highlighted line.
a search didn't gave much information
any help would be appreciated.
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|