Skip to content

ActiveRecord::StatementInvalid (TinyTds::Error: Type DT_BooleanFalse is not a defined system type.) #1005

Description

@jpsilvashy

Issue

I'm trying to query a DB which has some custom types, I've not seen before, one column has the type TD_BooleanFalse, when querying the db, the following error is raised:

ActiveRecord::StatementInvalid (TinyTds::Error: Type DT_BooleanFalse is not a defined system type.)

I've tried registering a type with an initializer like so:

ActiveRecord::Type.register(:DT_BooleanFalse, ActiveRecord::Type::SQLServer::Boolean)

And then setting the attribute type in the model with:

attribute :isDeleted, :DT_BooleanFalse

Although this does not work.

Details

  • Rails version: 6.1.4.4

  • SQL Server adapter version: v6.1.2.1

  • TinyTDS version: v1.3.7

  • FreeTDS details:

                              Version: freetds v1.3.7
               freetds.conf directory: /opt/homebrew/etc
       MS db-lib source compatibility: no
          Sybase binary compatibility: yes
                        Thread safety: yes
                        iconv library: yes
                          TDS version: 7.3
                                iODBC: no
                             unixodbc: yes
                SSPI "trusted" logins: no
                             Kerberos: yes
                              OpenSSL: yes
                               GnuTLS: no
                                 MARS: yes
    

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions