hello, i am trying to use ASP for something that can't be done in coldfusion: displaying blob objects.
for a single id, i can have 3 images.
is there a way i could loop to display the 3 objects using the following code (that i copied somewhere)
thanks.
<%
Dim oConn
Dim oRS
Dim icolpo
Response.Expires=0
Response.Buffer=True
Response.Clear
Response.contentType = "image/tif"
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open "Provider=SQEDB;User ID=someone; Password=someone; Initial Catalog=Test;Data
Source=DBTest"
IF Request.QueryString ="" THEN
Response.Write "nothing"
ELSE
Set oRS = Server.CreateObject("ADODB.Recordset"
oRs.Open " SELECT image" & _
" FROM DB1 d JOIN DB2 i
on i.id = d.id" & _
" WHERE i.second_id = " & _
Request.QueryString("second_id"
, oConn
Response.BinaryWrite oRS("image"
Response.end
END IF
'Close the recordset
oRS.Close
SET oRS = Nothing
'Close the connection
oConn.Close
Set oConn = Nothing
%>
for a single id, i can have 3 images.
is there a way i could loop to display the 3 objects using the following code (that i copied somewhere)
thanks.
<%
Dim oConn
Dim oRS
Dim icolpo
Response.Expires=0
Response.Buffer=True
Response.Clear
Response.contentType = "image/tif"
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open "Provider=SQEDB;User ID=someone; Password=someone; Initial Catalog=Test;Data
Source=DBTest"
IF Request.QueryString ="" THEN
Response.Write "nothing"
ELSE
Set oRS = Server.CreateObject("ADODB.Recordset"
oRs.Open " SELECT image" & _
" FROM DB1 d JOIN DB2 i
on i.id = d.id" & _
" WHERE i.second_id = " & _
Request.QueryString("second_id"
Response.BinaryWrite oRS("image"
Response.end
END IF
'Close the recordset
oRS.Close
SET oRS = Nothing
'Close the connection
oConn.Close
Set oConn = Nothing
%>