If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Facing error in binarywrite.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-04, 02:52
vsshah vsshah is offline
Registered User
 
Join Date: Oct 2002
Posts: 48
Facing error in binarywrite.

Hi,

I read all threads regarding this issue over here. but still not able to solve the problem.

I am using SQL Server 2000 database. and my table contains 2 pictures in each record.

I want to display image in .asp page, but not working.

My code is as below. I tried as you mentioned, but I am getting junk data, not image as output.

<%
Dim Cart_M

set Cart_M = Server.Createobject("ADODB.RecordSet")

Cart_M.ActiveConnection = MM_DB_STRING

Cart_M.Source = "Select CartName, Picture1, Picture2 From Cart_M Where CartName = '3M81-3C071-AD'"

Cart_M.open

If Not(Cart_M.EOF) Then

response.ContentType = "image/bmp"
response.binarywrite cart_m("picture2")

End if

Cart_M.close
%>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On