I am having a small problem when calling .update_attributes under linux using ODBC to connect to SQLServer. Inserting and viewing of database objects is working fine. Has anyone seen this problem, or maybe have some ideas on how to fix this? 22008 (241) [unixODBC][FreeTDS][SQL Server]Syntax error converting datetime from character string.: UPDATE query_repository_queries SET [version] = 2, [title] = ''test 3'', [created_on] = ''--- !ruby/object:DBI::Timestamp day: 4 fraction: 0 hour: 3 minute: 5 month: 10 second: 42 year: 2005'', [updated_on] = ''2005-10-04 03:07:26'', Thanks, -- Joe Clarke http://railsplayground.com
Joe, I have also just run into this. Did you ever find a work-around or solution? Here''s my log entry: ActiveRecord::StatementInvalid (DBI::DatabaseError: 22008 (241) [unixODBC][FreeTDS][SQL Server]Syntax error converting datetime from character string.: UPDATE recipe SET [replicate_type_id] = 1, [experiment_type_id] = 1, [name] = ''Queue Test'', [baked] = NULL, [queued] = ''2006-01-06T17:59:32-0500'', [workorder_id] = 3259, [description] = ''enqueue and dequeue this recipe'' WHERE id = 1): Jamie On Oct 4, 2005, at 11:31 AM, Joe Clarke wrote:> I am having a small problem when calling .update_attributes under > linux using ODBC to connect to SQLServer. Inserting and viewing of > database objects is working fine. Has anyone seen this problem, or > maybe have some ideas on how to fix this? > > 22008 (241) [unixODBC][FreeTDS][SQL Server]Syntax error converting > datetime from character string.: UPDATE query_repository_queries SET > [version] = 2, [title] = ''test 3'', [created_on] = ''--- > !ruby/object:DBI::Timestamp > day: 4 > fraction: 0 > hour: 3 > minute: 5 > month: 10 > second: 42 > year: 2005'', [updated_on] = ''2005-10-04 03:07:26'', > > > Thanks, > -- > Joe Clarke > http://railsplayground.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
There was a bug in an earlier version of ActiveRecord that was causing this. Are you using the latest version of Rails? -- Joe Clarke On 1/7/06, Jamie Orchard-Hays <jamie@dang.com> wrote:> Joe, I have also just run into this. Did you ever find a work-around > or solution? Here''s my log entry: > > > ActiveRecord::StatementInvalid (DBI::DatabaseError: 22008 (241) > [unixODBC][FreeTDS][SQL Server]Syntax error converting datetime from > character string.: > UPDATE recipe SET [replicate_type_id] = 1, [experiment_type_id] = 1, > [name] = ''Queue Test'', > [baked] = NULL, [queued] = ''2006-01-06T17:59:32-0500'', [workorder_id] > = 3259, > [description] = ''enqueue and dequeue this recipe'' WHERE id = 1): > > Jamie > > On Oct 4, 2005, at 11:31 AM, Joe Clarke wrote: > > > I am having a small problem when calling .update_attributes under > > linux using ODBC to connect to SQLServer. Inserting and viewing of > > database objects is working fine. Has anyone seen this problem, or > > maybe have some ideas on how to fix this? > > > > 22008 (241) [unixODBC][FreeTDS][SQL Server]Syntax error converting > > datetime from character string.: UPDATE query_repository_queries SET > > [version] = 2, [title] = ''test 3'', [created_on] = ''--- > > !ruby/object:DBI::Timestamp > > day: 4 > > fraction: 0 > > hour: 3 > > minute: 5 > > month: 10 > > second: 42 > > year: 2005'', [updated_on] = ''2005-10-04 03:07:26'', > > > > > > Thanks, > > -- > > Joe Clarke > > http://railsplayground.com > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > >