Image from database

Hello,
I want to displa a thumbnail image from the database. this is like when
a person logs in his thumbnail will be shown. The photo will be stored
in the database(MSSQL 2000) as binary data.Please help me to upload a
thumbnail sized image and display it on the screen.
Thank you.

Where's the code representing your own failed attempt?

Storing images in the database is a bad idea in the realm of
performance. Why not use the database you already have, the file
system?

Greg Donald wrote:

I want to displa a thumbnail image from the database. this is like when
a person logs in his thumbnail will be shown. The photo will be stored
in the database(MSSQL 2000) as binary data.Please help me to upload a
thumbnail sized image and display it on the screen.

Where's the code represe

Here the piece of code:

def photo
   @person = Person.find(params[:id])
   send_data(@person.uploaded_data,
                :filename=>@person.filename,
                 :type => @person.content_type,
            :disposition => 'inline')

end

but when i goto http://localhost:3000/person/photo/2308
I get the following error.

private method `gsub' called for #<Array:0x47454c4>

I also after reading a forum did the following
modified the following methods in the sqlserver_adapter.rb as follows
and things seems to work fine for me.

def self.string_to_binary(value)
   Base64.encode64(value)
end

def self.binary_to_string(value)
   Base64.decode64(value)
end

undefined method `unpack' for #<Array:0x4611800>