Skip to content

TinyTds::Error: Error converting data type varchar to datetime2 #531

@sharmarahul

Description

@sharmarahul

Connecting to remote azure sql server V12 database. One of the table contains a column that holds date. When I retrieve this record in ActiveRecord, I see the date returned in a string format. I want to retrieve all records in a daterange, But I keep getting error TinyTds::Error: Error converting data type varchar to datetime2

Have installed FREETDS version v1.00.23.
freetds.conf output contains
[global]
# TDS protocol version
tds version = auto

and tsql -C returns:

Compile-time settings (established with the "configure" script)
Version: freetds v1.00.23
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.3
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: no
GnuTLS: no
MARS: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions