Re: SQLServer y fechas en W2000


#1

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


#2

Ror-es mailing list
removed_email_address@domain.invalid
http://lists.simplelogica.net/mailman/listinfo/ror-es