An application is logging faxes sent in SQL2000 image column type. I have
found code on the net but what it is doing is prompting to save to local
which is fine for single page image. Not good for multiple page faxes. I
have not been able to locate an example to load in the browser or how to
handle multiple image in the one column.
1) Ideally it would be nice to display back in the browser since some may be
multiple images. I am not a programmer but any help is appreciated..
<%
Dim strAttachID
strAttachID = Request.QuerySt ring("AttachID" )
Dim objConn, objRS, strSQL
adoconnectstr = "Driver={SQ L
Server};databas e=faxmakerarchi ve;Server=XXXX; uid=XXXX;pwd=XX X;CommandTimeou t
= 180"
set objCon = server.CreateOb ject("ADODB.Con nection")
set objRec = server.CreateOb ject("ADODB.Rec ordset")
objCon.Open adoconnectstr
strSQL = "SELECT attdata FROM fm_faxout_att WHERE ID ='" & strAttachID &
"'"
objrec.Open strSQL, objCon
Response.Conten tType = "image/tiff"
'Response.Conte ntType = "applicatio n/pdf"
Response.Binary Write objrec("attdata ")
objrec.Close
Set objrec = Nothing
objCon.Close
Set objCon = Nothing
%>
TIA!!
found code on the net but what it is doing is prompting to save to local
which is fine for single page image. Not good for multiple page faxes. I
have not been able to locate an example to load in the browser or how to
handle multiple image in the one column.
1) Ideally it would be nice to display back in the browser since some may be
multiple images. I am not a programmer but any help is appreciated..
<%
Dim strAttachID
strAttachID = Request.QuerySt ring("AttachID" )
Dim objConn, objRS, strSQL
adoconnectstr = "Driver={SQ L
Server};databas e=faxmakerarchi ve;Server=XXXX; uid=XXXX;pwd=XX X;CommandTimeou t
= 180"
set objCon = server.CreateOb ject("ADODB.Con nection")
set objRec = server.CreateOb ject("ADODB.Rec ordset")
objCon.Open adoconnectstr
strSQL = "SELECT attdata FROM fm_faxout_att WHERE ID ='" & strAttachID &
"'"
objrec.Open strSQL, objCon
Response.Conten tType = "image/tiff"
'Response.Conte ntType = "applicatio n/pdf"
Response.Binary Write objrec("attdata ")
objrec.Close
Set objrec = Nothing
objCon.Close
Set objCon = Nothing
%>
TIA!!
Comment