Skip to content

[AVM-38723] Bring back ODBC support for 8-0-stable branch#19

Merged
jyothu merged 9 commits into
8-0-stable-with-odbcfrom
topic/jyothish/8-0-stable-with-odbc-AVM-38723
Aug 25, 2025
Merged

[AVM-38723] Bring back ODBC support for 8-0-stable branch#19
jyothu merged 9 commits into
8-0-stable-with-odbcfrom
topic/jyothish/8-0-stable-with-odbc-AVM-38723

Conversation

@jyothu
Copy link
Copy Markdown

@jyothu jyothu commented Aug 21, 2025

Bring back ODBC support for 8-0-stable branch

- use SET NOCOUNT ON so that the number of rows affected by INSERT
  statement is returned instead of the number of rows affected by the trigger
- Refer https://techcommunity.microsoft.com/t5/SQL-Server/UPDATE-with-OUTPUT-clause-8211-Triggers-8211-and-SQLMoreResults/ba-p/383457
Comment thread activerecord-sqlserver-adapter.gemspec
@sukeerthiadiga
Copy link
Copy Markdown

LGTM.

@jyothu jyothu force-pushed the topic/jyothish/8-0-stable-with-odbc-AVM-38723 branch from 909b4b9 to a7a7c2d Compare August 25, 2025 12:19
Lalitha and others added 8 commits August 25, 2025 17:56
…ed as binary / ASCII-8Bit

- Added a check to make sure the object is String. ActiveRecord tests passes objects which are other than String.
- Added a check to make sure we are not modifying the frozen object. There are tests which passes frozen objects.
- 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
- Error found: MigrationTestSQLServer::For changing column#test_0002_not drop the default contraint if just renaming: TypeError: no implicit conversion of String into Integer
- array needs to be flattened before calling select method
- Error found: SerializedAttributeTest#test_json_read_legacy_null: ActiveRecord::RecordNotFound: Couldn't find Topic without an ID

- updated sql_for_insert method to use OUTPUT clause to get the ID of the last inserted record and with a single sql statement
…uby::ODBC module

- The UTF8 version does not appear to support multiple statements in a single query. So things like `query; SELECT @@rowcount` do not work
- ActiveRecord SQLServer Adapter defaults to TinyTDS. And the support for ODBC has been removed. This is the effort to support Adapter with ODBC Driver again.

- ruby-odbc is now pointed to https://github.com/cloudvolumes/ruby-odbc 0.103.cv
@jyothu jyothu force-pushed the topic/jyothish/8-0-stable-with-odbc-AVM-38723 branch from a7a7c2d to 9cc715c Compare August 25, 2025 12:26
@jyothu jyothu requested a review from sukeerthiadiga August 25, 2025 12:31
@jyothu jyothu added the enhancement New feature or request label Aug 25, 2025
@jyothu jyothu merged commit ee32304 into 8-0-stable-with-odbc Aug 25, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants