binary data (pictures) from sql-source with asp/vbs/jscr 
Author Message
 binary data (pictures) from sql-source with asp/vbs/jscr

Hi folks,

does anyone know how to do the following task:

I have binary data (pictures, jpg) in an sql-server table.
I need to extract it with asp/VBScript/jscript and have to display it on
the browser

any solutions?

thanx a lot in advance

Marcell



Sat, 28 Jul 2001 03:00:00 GMT  
 binary data (pictures) from sql-source with asp/vbs/jscr

Quote:

> I have binary data (pictures, jpg) in an sql-server table.
> I need to extract it with asp/vbscript/jscript and have to display it on

the browser

One way would be to extract the data to a temporary file (using the
"Scripting.FileSystemObject" component) and then send that as a URI to the
client. You would need to keep track of all your temp files and then delete
them (for example in Session_OnEnd).

Another solution would be to make an ISAPI plug-in that would accept
requests and then extract the data from the table and return it to the
client on the fly. Instead of giving your <img> tags a 'src' attribute of
*.jpg or *.gif, you could give them your DLL name with parameters requesting
the correct file (eg, the Primary Key). It would have to send the correct
HTTP content-type headers, etc.

There may be easier ways to do this, but I don't know of them! :-)

Peter

--
Peter Torr, Developer / Webmaster, Vantage Systems Australia.



Sun, 29 Jul 2001 03:00:00 GMT  
 binary data (pictures) from sql-source with asp/vbs/jscr
thanks a lot!

Marcell

Peter Torr schrieb:

Quote:

> > I have binary data (pictures, jpg) in an sql-server table.
> > I need to extract it with asp/vbscript/jscript and have to display it on
> the browser

> One way would be to extract the data to a temporary file (using the
> "Scripting.FileSystemObject" component) and then send that as a URI to the
> client. You would need to keep track of all your temp files and then delete
> them (for example in Session_OnEnd).

> Another solution would be to make an ISAPI plug-in that would accept
> requests and then extract the data from the table and return it to the
> client on the fly. Instead of giving your <img> tags a 'src' attribute of
> *.jpg or *.gif, you could give them your DLL name with parameters requesting
> the correct file (eg, the Primary Key). It would have to send the correct
> HTTP content-type headers, etc.

> There may be easier ways to do this, but I don't know of them! :-)

> Peter

> --
> Peter Torr, Developer / Webmaster, Vantage Systems Australia.




Sun, 29 Jul 2001 03:00:00 GMT  
 binary data (pictures) from sql-source with asp/vbs/jscr

Heres how I did something like that:

Set an image tag in the html file like this:  
<img src="datapicture.asp?database=picture&record=150">
This will call the ASP file when the image is requested

in datapicture.asp
<%
response.buffer = true
<< do your database stuff to get the binary data >>
response.header = "Content-type: image/gif"
response.binarywrite <Database Entry>
%>

--
Matthew Hazlett
Bell Atlantic Mobile


  Hi folks,
  does anyone know how to do the following task:

  I have binary data (pictures, jpg) in an sql-server table.
  I need to extract it with asp/vbscript/jscript and have to display it on the browser

  any solutions?

  thanx a lot in advance

  Marcell



Mon, 06 Aug 2001 03:00:00 GMT  
 binary data (pictures) from sql-source with asp/vbs/jscr
Something like this.

response.contenttype = "jpg" (whatever the tag is for an image)

rsBlob.open "select image from image", "connection info"

response.binarywrite rs.fields(0).getchunk()

response.end

Hope that helps

Quote:


>> I have binary data (pictures, jpg) in an sql-server table.
>> I need to extract it with asp/vbscript/jscript and have to display it on
>the browser

>One way would be to extract the data to a temporary file (using the
>"Scripting.FileSystemObject" component) and then send that as a URI to the
>client. You would need to keep track of all your temp files and then delete
>them (for example in Session_OnEnd).

>Another solution would be to make an ISAPI plug-in that would accept
>requests and then extract the data from the table and return it to the
>client on the fly. Instead of giving your <img> tags a 'src' attribute of
>*.jpg or *.gif, you could give them your DLL name with parameters
requesting
>the correct file (eg, the Primary Key). It would have to send the correct
>HTTP content-type headers, etc.

>There may be easier ways to do this, but I don't know of them! :-)

>Peter

>--
>Peter Torr, Developer / Webmaster, Vantage Systems Australia.




Wed, 08 Aug 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. binary data (pictures) from sql-source with asp/vbs/jscr

2. retrieve binary data from SQL server onto ASP page

3. problems on displaying binary data on browser as picture

4. problems on displaying binary data on the browser as a picture

5. Binary Data in SQL 2000/Conver to Bitmap Data For Data Grid View

6. how to save binary data (SQL)

7. Write binary data from SQL as image/bitmap in RTF

8. how to save binary data (SQL)

9. Retrieving Pictures From a SQL Server using ASP

10. requesting data from SQL 7.0 with .vbs file

11. How can I capture url source code and post it to sql server via asp page

12. About binary data in ASP

 

 
Powered by phpBB® Forum Software