search for: sqlserveradapt

Displaying 6 results from an estimated 6 matches for "sqlserveradapt".

Did you mean: sqlserveradapter
2006 Feb 01
0
Please explain transactions within sqlserveradapter.rb ?
Hello everyone, I am needing to resolve an error on sqlserveradapter revolving around a trigger on a table. When the AR object is saved, AR throws Cannot create new connection because in manual or distributed transaction mode. at from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract_adapter.rb:88:in `log'...
2007 Nov 28
0
Where to override ActiveRecord::ConnectionAdapters::SQLServerAdapter?
I''m working on an existing global database running on MS SQL Server. The appropriate primary key is uniqueidentifier, so I want to set ActiveRecord::ConnectionAdapters::SQLServerAdapter#native_database_types[:primary_key] = "uniqueidentifier NOT NULL newid() PRIMARY KEY". Obviously, I need to override the native_database_types definition, but I really don''t know where I should put the code so rails picks it up. I want to do this in migrations. --~--~------...
2007 Jan 18
4
Defining the expected behavior of DatabaseStatements.execute()
It would be very helpful if the core team could define and document the expected behavior of DatabaseStatements.execute(). The implementations appear to vary. Most adapters will return some sort of native result set, SQL Server returns nil and expects a block, DB2 and Sybase return the affected row count. So please, will someone in core explain the expected behavior and can the execute()
2006 Feb 07
0
Creating DB from within Rails
Hi, Is it possible to create a new database (I know how to establish a secondary connection) from within rails, using ActiveRecord::Schema? There''s a create_database method under ActiveRecord::ConnectionAdapters::SQLServerAdapter but I don''t see similar methods for the other adapters. Thanks, Mike
2008 Feb 20
0
Unicode Support for MS SQL Server
...odel, I found I had to do the following: 1) Change the underlying column type from varchar to nvarchar. 2) Prepend any quoted values going into nvarchar columns with a capital-letter-N, e. g. ''unicode'' becomes N''unicode'' In order to accomplish this, I modified SQLServerAdapter#quote to look like this: def quote(value, column = nil) return value.quoted_id if value.respond_to?(:quoted_id) case value when TrueClass then ''1'' when FalseClass then ''0'' when Time, D...
2006 Apr 08
4
Calling validates_inclusion_of out of default namespace
...ations.validates_inclusion_of", but I can''t seem to find the logic in it. So, how do I call it? This question could be generalised, because I never know what to call when something is not in de default namespace. For example, how do I know that "ActiveRecord::ConnectionAdapters::SQLServerAdapter.select_one" can be run by "ActiveRecord::Base.connection.select_one"? I happen to know this one, but I would have never guessed... Thanks in advance.