Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp,blob and coldfusion

Status
Not open for further replies.

mimi2

Technical User
Apr 2, 2002
407
CA
hello,
since it is impossible to view a blob object from a coldfusion application, i am trying to use asp for that (this is the first time i am doing that).
it is not working. could you tell why. thanks
<%
Dim oConn
Dim oRS
Dim icolpo

Response.Expires=0
Response.Buffer=True
Response.Clear

Response.contentType = &quot;image/tif&quot;

Set oConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
oConn.Open &quot;Provider=SQLOLEDB;User ID=someone; Password=someone; Initial Catalog=Test;Data
Source=DBTest&quot;
IF Request.QueryString =&quot;&quot; THEN
Response.Write &quot;nothing&quot;
ELSE

Set oRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
oRs.Open &quot; SELECT image&quot; & _
&quot; FROM DB1 d JOIN DB2 i
on i.d = d.id&quot; & _
&quot; WHERE i.second_id = &quot; & _
Request.QueryString(&quot;second_id&quot;), oConn


Response.BinaryWrite oRS(&quot;image&quot;)

Response.end

END IF

'Close the recordset
oRS.Close
SET oRS = Nothing

'Close the connection
oConn.Close
Set oConn = Nothing

%>



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top