Skip to content

Instantly share code, notes, and snippets.

@claco
Created January 5, 2011 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claco/766406 to your computer and use it in GitHub Desktop.
Save claco/766406 to your computer and use it in GitHub Desktop.
ODBC::Error: 37000 (2750) [Microsoft][ODBC SQL Server Driver][SQL Server]Column or parameter #8: Specified column precision 55 is greater than the maximum precision of 38.: CREATE TABLE [numeric_data] ([id] int NOT NULL IDENTITY(1,1) PRIMARY KEY, [bank_balance] decimal(10,2), [big_bank_balance] decimal(15,2), [world_population] decimal(10,0), [my_house_population] decimal(2,0), [decimal_number_with_default] decimal(3,2) DEFAULT 2.78, [temperature] float(8), [atoms_in_universe] decimal(55,0))
-------
C:\Users\claco\activerecord-sqlserver-adapter> bundle exec rake test:odbc
(in C:/Users/claco/activerecord-sqlserver-adapter)
C:/Ruby192/bin/ruby.exe -I"lib;test;test/connections/native_sqlserver_odbc;C:\Users\claco\rails/activerecord/test" "C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb" "test/cases/aaaa_create_tables_test_sqlserver.rb" "test/cases/adapter_test_sqlserver.rb" "test/cases/attribute_methods_test_sqlserver.rb" "test/cases/belongs_to_associations_test_sqlserver.rb" "test/cases/calculations_test_sqlserver.rb" "test/cases/column_test_sqlserver.rb" "test/cases/connection_test_sqlserver.rb" "test/cases/eager_test_sqlserver.rb" "test/cases/execute_procedure_test_sqlserver.rb" "test/cases/finder_test_sqlserver.rb" "test/cases/has_and_belongs_to_many_associations_test_sqlserver.rb" "test/cases/inheritance_test_sqlserver.rb" "test/cases/method_scoping_test_sqlserver.rb" "test/cases/migration_test_sqlserver.rb" "test/cases/offset_and_limit_test_sqlserver.rb" "test/cases/pessimistic_locking_test_sqlserver.rb" "test/cases/query_cache_test_sqlserver.rb" "test/cases/schema_dumper_test_sqlserver.rb" "test/cases/session_test_sqlserver.rb" "test/cases/specific_schema_test_sqlserver.rb" "test/cases/table_name_test_sqlserver.rb" "test/cases/transaction_test_sqlserver.rb" "test/cases/unicode_test_sqlserver.rb" "test/cases/uniqueness_validation_test_sqlserver.rb"
Using SQLServer via ODBC to activerecord_unittest
C:/Users/claco/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `rescue in log': ODBC::Error: 37000 (2750) [Microsoft][ODBC SQL Server Driver][SQL Server]Column
or parameter #8: Specified column precision 55 is greater than the maximum precision of 38.: CREATE TABLE [numeric_data] ([id] int NOT NULL IDENTITY(1,1) PRIMARY KEY, [bank_balance] decimal(10,2), [big_bank_balance] decimal(15,2), [world_population] decimal(10,0), [my_house_population] decimal(2,0), [decimal_number_with_default] decimal(3,2) DEFAULT 2.78, [temperature] float(8), [atoms_in_universe] decimal(55,0)) (ActiveRecord::StatementInvalid)
from C:/Users/claco/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:194:in `log'
from C:/Users/claco/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:227:in `do_execute'
from C:/Users/claco/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:in `execute'
from C:/Users/claco/rails/activerecord/test/cases/helper.rb:40:in `execute_with_query_record'
from C:/Users/claco/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:167:in `create_table'
from C:/Users/claco/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/schema_statements.rb:50:in `create_table'
from C:/Users/claco/rails/activerecord/lib/active_record/migration.rb:383:in `block in method_missing'
from C:/Users/claco/rails/activerecord/lib/active_record/migration.rb:359:in `block in say_with_time'
from C:/Ruby192/lib/ruby/1.9.1/benchmark.rb:294:in `measure'
from C:/Users/claco/rails/activerecord/lib/active_record/migration.rb:359:in `say_with_time'
from C:/Users/claco/rails/activerecord/lib/active_record/migration.rb:379:in `method_missing'
from C:/Users/claco/rails/activerecord/test/schema/schema.rb:339:in `block in <top (required)>'
from C:/Users/claco/rails/activerecord/lib/active_record/schema.rb:51:in `instance_eval'
from C:/Users/claco/rails/activerecord/lib/active_record/schema.rb:51:in `define'
from C:/Users/claco/rails/activerecord/test/schema/schema.rb:1:in `<top (required)>'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:235:in `load'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:235:in `block in load'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:591:in `new_constants_in'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:225:in `load_dependency'
from C:/Users/claco/rails/activesupport/lib/active_support/dependencies.rb:235:in `load'
from C:/Users/claco/rails/activerecord/test/cases/helper.rb:78:in `<top (required)>'
from C:/Users/claco/activerecord-sqlserver-adapter/test/cases/sqlserver_helper.rb:19:in `require'
from C:/Users/claco/activerecord-sqlserver-adapter/test/cases/sqlserver_helper.rb:19:in `<top (required)>'
from test/cases/aaaa_create_tables_test_sqlserver.rb:2:in `require'
from test/cases/aaaa_create_tables_test_sqlserver.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `load'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `block in <main>'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `each'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `<main>'
rake aborted!
Command failed with status (1): [C:/Ruby192/bin/ruby.exe -I"lib;test;test/c...]
C:/Ruby192/lib/ruby/1.9.1/rake.rb:993:in `block in sh'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `sh'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `sh'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1027:in `ruby'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `ruby'
C:/Ruby192/lib/ruby/1.9.1/rake/testtask.rb:115:in `block (2 levels) in define'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1110:in `verbose'
C:/Ruby192/lib/ruby/1.9.1/rake/testtask.rb:100:in `block in define'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/Ruby192/bin/rake:31:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment