[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rails Problem - Ms Sqlserver image columns and Rails

Erhan Erisken

6/30/2006 7:55:00 AM

Hi,

We are suffering from SQLSErver image column problem...
We have a image column stored in SQL Server 2005 and
We used the technique told in "Agile Web Dev with Rails" to display it
in a web browser...


But, all we get is numbers... And img tag can not display it...


Could you know a workaround for this problem, and if it is so, could
you share it with us... Is this specific to Ms SqlServer?


Here is controller action sending image data...
def GetPict
@p = Personel.find("5049-0361")
send_data @p.Pict,
:filename => "pict.bmp", :type =>
"image/bmp",
:disposition => "inline"
End


And here is corresponding rhtml part....
<tr><td>
<img src = "<%= url_for(:action => "GetPict") %>" />
</td></tr>


Thanks in advance....