Ok, looks like I was getting which db errs which way incorrectly. Date
definitely doesn't quote for SQLServer.. here's a snip of my test
code. Everything runs fine on sqlite and mysql (it handles the date).
ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute
OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
Syntax error converting datetime from character string.
...
For the values section for that field I get 'Sat Jan 07 08:51:09
Pacific Standard Time 2006' which looks to be the the correct
date.to_s
On 1/3/06, Michael Koziarski <[EMAIL PROTECTED]> wrote:
> > So how to place true and false (1 and 0, 't' and 'f' etc) or
> > Date values or what have you.
> >
> > Does anyone have suggestions/comments to that end?
>
> For boolean values, you can just use true/false. The adapters know
> how to quote the values correctly. AR's own unit tests rely on this
> behaviour.
>
> I think you should be able to use dates and times similarly:
>
> irb(main):005:0> d = YAML.load("thing: 2001-12-14t21:59:43.10-05:00 ")
> => {"thing"=>Sat Dec 15 15:59:43 NZDT 2001}
> irb(main):007:0> d["iso8601"].class
> => Time
>
>
>
> --
> Cheers
>
> Koz
>
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core