[erlang-questions] Bigints are converted to floats when using ODBC with MSSQL

Michael Uvarov <>
Mon Mar 12 20:24:42 CET 2018


Hi,

I am using MSSQL with unixodbc on Ubuntu (unixodbc + tdsodbc packets).

My odbc.ini is:


[mongoose-mssql]

    Driver =
/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
    Setup =
/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
    Server =
127.0.0.1
    Port =
1433
    Database =
ejabberd

    Charset =
UTF-8
    TDS Version = 8.0


So, the query
odbc:sql_query(Conn, "select cast(1 as bigint)").
returns floats:
{selected,[[]],[{1.0}]}

instead of:
{selected,[[]],[{1}]}

Is there any way to change this behaviour?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180312/eea82bf2/attachment.html>


More information about the erlang-questions mailing list