David De vits wrote:
> Hi,
> Im trying to get an image out a mssql image type datafield thru DBI:ADO.
> The problem is that the result returned is an array and not a binary
> string and thus the image is garbage when i write it to a file. Is there
> a way to turn the array into a binary string ? Or some other solution ?
> 
> this is the function i use to get the photo out of the database:
> def self.get_photo(dbh)
>   sql = "SELECT p_photo, photoinfo, photo " +
>         "FROM photos " +
>         "WHERE p_photo = '0' "
>   sth = dbh.prepare(sql)
>   sth.execute()
>   row = sth.fetch
>   return row[2]
>  end

Hi

Did You get any result? I have the same problem and don't know how to 
do.

Kind Regards.
-- 
Posted via http://www.ruby-forum.com/.