Image field (binary), MS SQL Server

We had to switch back to .NET web services because of this bug. The SQL
Server adapter isn't maintained very well.

I'm sorry you feel that way. Storing binary data in the db simply
isn't a priority for me, so I've not really looked at this issue.

In any case, without any way to stream binary data to/from the
database, storing anything other than very small pieces of binary data
will be inefficient. Even without proper binary support, you could
always Base64 encode/decode any data you have.

I do hope this gets fixed.

While there are some reports with suggested fixes, I don't believe
anyone has submitted a tested patch. If I'm mistaken, or if you can
provide one, I will take a look at it (assign it to tomafro).
However, I don't have commit rights to the repository so all I can do
is suggest any patch gets applied (I'm not moaning though - Jeremy is
usually great at doing this promptly).

Tom

Is this bug adressed already ? I am connecting with a ms sql database
(which works fine) By using the connection specified in my database.yml
adapter: sqlserver i got this private method `gsub' called for
#<Array:0xae06104> exception. But by using DBI::connect i was able to
get some data from an image type datafield (which apears to be an array)
from the database. And sent it to the browser using
send_data(@data,:filename => "test",:type => "image/jpeg")
Only this file isnt viewable , so i guess the jpeg is wraped in some
kind of package. I ll go looking for the format and how to display it
properly, but if anyone of u knos how to do this it could save me some
time. Thx

David De vits wrote:

Is this bug adressed already ? I am connecting with a ms sql database
(which works fine) By using the connection specified in my database.yml
adapter: sqlserver i got this private method `gsub' called for
#<Array:0xae06104> exception. But by using DBI::connect i was able to
get some data from an image type datafield (which apears to be an array)
from the database. And sent it to the browser using
send_data(@data,:filename => "test",:type => "image/jpeg")
Only this file isnt viewable , so i guess the jpeg is wraped in some
kind of package. I ll go looking for the format and how to display it
properly, but if anyone of u knos how to do this it could save me some
time. Thx

The same problem. And still looking solution...

I am required to use MSSQL for a project I am doing. I am running into
the same problem using open_id_authentication plugin which stores the
server_url in binary format.

Anyway, here is the error I recieve:

ActiveRecord::StatementInvalid in SessionsController#create

DBI::DatabaseError: Execute
    OLE error code:80040E14 in Microsoft OLE DB Provider for SQL
Server
      The data types image and varchar are incompatible in the equal
to operator.
    HRESULT error code:0x80020009
      Exception occurred.: SELECT * FROM
open_id_authentication_associations WHERE
(open_id_authentication_associations.[server_url] = 'http://
www.myopenid.com/server')

I am looking into how to fix this. I would assume this would have been
fixed already, but I will try and figure it out :frowning: