Skip to content

Commit 728377d

Browse files
author
Lalitha Chitharanjan (c)
committed
Fix String or Binary data truncation error
- Error found: ActiveRecord::ValueTooLong: ODBC::Error: 22001 (8152)[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]String or binary data would be truncated. - Require odbc_utf8 so that UTF-8 variant of the module is in use, and string data is automatically converted to/from Unicode
1 parent 5a0ceff commit 728377d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'base64'
22
require 'active_record'
3+
require 'odbc_utf8'
34
require 'arel_sqlserver'
45
require 'active_record/connection_adapters/abstract_adapter'
56
require 'active_record/connection_adapters/sqlserver/core_ext/active_record'

0 commit comments

Comments
 (0)