Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Rails Problem - Ms Sqlserver image columns and Rails

Thread Tools

Rails Problem - Ms Sqlserver image columns and Rails

Posts: n/a

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 =>
:disposition => "inline"

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

Thanks in advance....

Reply With Quote

Thread Tools

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading ASP w/SQLserver 2000 to ASP.NET w/ SQLserver 2005 =?Utf-8?B?SmVmZnJleQ==?= ASP .Net 2 04-27-2007 03:33 PM
database columns vs. gui columns and sorting Java 5 03-04-2006 10:48 AM
CSS columns problem - faux columns don't work HTML 4 11-24-2005 10:05 AM
convert rows to columns and columns to rows helpful sql ASP .Net 0 05-19-2005 06:03 PM
sessionstate sqlserver mode image path problem Phl ASP .Net 0 12-02-2004 06:09 PM