There is a bug in the activerecord-sqlserver-adapter-2.2.21 gem. The error is in: activerecord-sqlserver-adapter-2.2.21\lib\active_record \connection_adapters\sqlserver_adapter.rd And is at line 1058. FROM #{db_name}INFORMATION_SCHEMA.COLUMNS columns should be FROM #{db_name}.INFORMATION_SCHEMA.COLUMNS columns If the period between the db_name and INFORMATION_SCHEMA is missed out, the database name gets appended to INFORMATION_SCHEMA. For example, if the database name is ''database_one'', you will get an error: Invalid object name ''database_oneINFORMATION_SCHEMA.COLUMNS'' when you enter a connection.select.
The SQL Server adapter is not part of Rails Core. The project is here: http://github.com/rails-sqlserver/2000-2005-adapter This bug looks familiar and there may have been a ticket or a current one under progress. If not please open up a Github issues, issue, for it. - Thanks, Ken On Sep 23, 2009, at 10:09 AM, Rob Nichols wrote:> > There is a bug in the activerecord-sqlserver-adapter-2.2.21 gem. The > error is in: > > activerecord-sqlserver-adapter-2.2.21\lib\active_record > \connection_adapters\sqlserver_adapter.rd > > And is at line 1058. > > FROM #{db_name}INFORMATION_SCHEMA.COLUMNS columns > > should be > > FROM #{db_name}.INFORMATION_SCHEMA.COLUMNS columns > > If the period between the db_name and INFORMATION_SCHEMA is missed > out, the database name gets appended to INFORMATION_SCHEMA. For > example, if the database name is ''database_one'', you will get an > error: > > Invalid object name ''database_oneINFORMATION_SCHEMA.COLUMNS'' when you > enter a connection.select. > > >
You are right Ken. The issue is here: http://github.com/rails-sqlserver/2000-2005-adapter/issues/closed/#issue/3 I''ve added my two pennies worth. Thank you. Rob On Sep 23, 3:29 pm, Ken Collins <k...@metaskills.net> wrote:> The SQL Server adapter is not part of Rails Core. The project is here:http://github.com/rails-sqlserver/2000-2005-adapter > > This bug looks familiar and there may have been a ticket or a current > one under progress. If not please open up a Github issues, issue, for > it. > > - Thanks, > Ken