I forgot to add this, showing the problem:

require 'tiny_tds'
require 'sequel'

ms_db = Sequel.connect('tinytds://172.28.128.1', db_type: 'mssql', user: 
ENV['USERNAME'], password: ENV['PASSWORD'])
odbc_db = Sequel.connect('odbc:/VoucherEngine', db_type: 'mssql', user: 
ENV['USERNAME'], password: ENV['PASSWORD'])

puts ms_db["SELECT CAST(1 AS BIT)"].first.inspect
puts odbc_db["SELECT CAST(1 AS BIT)"].first.inspect

This will output

{:untitled=>true}
{:untitled=>1}


On Thursday, 9 April 2015 13:08:40 UTC+2, Jurgens du Toit wrote:
>
> Hey
>
> We recently switching from using the mssql adapter to using the odbc 
> adapter. It seems, though, that the ODBC adapter doesn't convert MSSQL bit 
> fields into booleans, causing some eratic behaviour in our apps.
>
> I tried looking through the code for a setting or where this was 
> previously solved, but couldn't find any. I ended up doing a small code 
> change, but couldn't find the proper place to test it.
>
> Can I get some feedback / input on this? The proposed PR is here: 
> https://github.com/jeremyevans/sequel/compare/master...jrgns:odbc-bit-is-boolean
>
> Thanx!
> Jrgns
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to