Ask a Question related to ASP, Design and Development.
-
Roberto #1
HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type
I have the following problem:
I have the following form client side:
<FORM.......>
<FORM action="./WZUpload.asp" method="Post" enctype="multipart/form-data"
WIDTH=100%>
<INPUT Type="file" name="UpFileName" STYLE="{Width:400px}"><BR>
I have the following ASP code server side ....
AllDataB = Request.BinaryRead()
AllData = ConvertToStringFromByte(AllDataB)
AllDataFile = pGetRequestItem(AllData....) ' THIS INSTRUCTION FIND FILE
BINARY DATA.....
I need to transform SAFE ARRAY AllDataB in a Vb string because it's
necessary for me to find Header info and because AllDataB doesn't contain
only FILE BINARY DATA but other informations.
Now I want to insert DIRECTLY File Binary Data (in the variable AllDataFile)
in a Sql Server Image field without writing AllDataFile to a local file
using the FileSysteObject.
If I write:
Rs("ImageField").AppendChunk AllDataFile
IT DOESN'T WORK: the data format is UNICODE. And If I open the file the
format is UNRECOGNIZED.
Is There a Mode to insert directly data from BinaryRead to Sql Server Image
data type ?
If I write data from binaryread to a local file with FILESYSTEMOBJECT and I
read it with ADODB.STREAM and I write ADODB.STREAM content to SQL SERVER
IMAGE DATA TYPE it works but it's VERY VERY slow with large files.
Thanks Rob
Roberto Guest
-
Mimic Input Type=File server to server
Hello, here's my problem: On my web server I generate a file, I need to send this file to a different web server. I have no control over... -
HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type ?
I have the following problem: I have the following form client side: <FORM.......> <FORM action="./WZUpload.asp" method="Post"... -
input type=file
is it possible to define a default or start up directory with input type="file" field type? If so, is it also possible to filter by another... -
Is it possible to test an uploaded file to check the type?
Is it possible to check a file in $_FILES to make sure it is of a certain format? I want to allow a user to only upload jpegs or mpegs, and want... -
[PHP] Is it possible to test an uploaded file to check the type?
On Sunday 13 July 2003 01:24, Dan Anderson wrote: If on un*x you can use the 'file' program. Also search on freshmeat.net, I believe there is a... -
¥xÆW·L³n§Þ³N³B¤ä´©³¡ #2
RE: HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type
Hi Rob,
You may try following code to see if it will help:
Set objADO = CreateObject("ADODB.Stream")
objADO.Open
objADO.Type = 1
objADO.Write Request.BinaryRead(Request.TotalBytes)
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
¥xÆW·L³n§Þ³N³B¤ä´©³¡ Guest
-
Roberto #3
Re: HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type
Ok. But Request.BinaryRead doesn't contain only binary data of FILE but
other information : for example
CONTENT - TYPE
CONTENT - DISPOSITION....
etc etc.....
Now I must position at the begin of Binary Data.....I have tried with INSTRB
and MIDB but if I call INSTRB with Binary Data it goes in crash.
Rob.
""¥xÆW·L³n§Þ³N³B¤ä´©³¡"" <lukezhan@online.microsoft.com> wrote in message
news:VanD914kDHA.2088@cpmsftngxa06.phx.gbl...> Hi Rob,
>
> You may try following code to see if it will help:
>
> Set objADO = CreateObject("ADODB.Stream")
> objADO.Open
> objADO.Type = 1
> objADO.Write Request.BinaryRead(Request.TotalBytes)
>
> Luke
> Microsoft Online Support
>
> Get Secure! [url]www.microsoft.com/security[/url]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Roberto Guest
-
MSFT #4
Re: HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type
Hi Rob,
To remove the redundant data, you may refer to following article for third
party solution or pure script solution:
[url]http://www.aspfaq.com/show.asp?id=2189[/url]
Addtionally, there is also a way with MSXML:
[url]http://www.15seconds.com/issue/010522.htm[/url]
Hope this help,
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest



Reply With Quote

