Forum: Rails-ES Re: SQLServer y fechas en W2000

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Angel Mauricio Pino Gonzalez (Guest)
on 2007-02-21 17:24
(Received via mailing list)
Encontre esto , lo probare y les cuento, si alguien sabe algo más, se
lo agrdecere.


 Re: Re: SQL Server datetime error
Posted by Tom W. (Guest)
on 30.01.2006 13:59
(Received via mailing list)

Noob,

One more attempt to try and fix this issue:

Could you replace the quote method in sqlserver_adapter.rb with this
and see if it helps at all:

def quote(value, column = nil)
        case value
          when String
            if column && column.type == :binary
              "'#{quote_string(column.class.string_to_binary(value))}'"
            else
              "'#{quote_string(value)}'"
            end
          when NilClass              then "NULL"
          when TrueClass             then '1'
          when FalseClass            then '0'
          when Float, Fixnum, Bignum then value.to_s
          when Date, Time, DateTime  then "convert(datetime,
'#{value.strftime("%Y-%m-%d %H:%M:%S")}', 121)"
          else
"'#{quote_string(value.to_yaml)}'"
        end
      end




--
Angel Mauricio Pino G
removed_email_address@domain.invalid
Movil: 08-577.92.72
Manel Monguilod (Guest)
on 2007-02-21 17:35
(Received via mailing list)
_______________________________________________
Ror-es mailing list
removed_email_address@domain.invalid
http://lists.simplelogica.net/mailman/listinfo/ror-es
This topic is locked and can not be replied to.