[erlang-questions] Bigints are converted to floats when using ODBC with MSSQL
Michael Uvarov
freeakk@REDACTED
Mon Mar 12 23:23:02 CET 2018
Should be:
TDS_Version = 7.1
in that config.
in that case it returns
{selected,[[]],[{"1"}]}
On 12 March 2018 at 20:24, Michael Uvarov <freeakk@REDACTED> wrote:
> 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?
>
--
С уважением,
Уваров Михаил.
Best regards,
Uvarov Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180312/1d0489b6/attachment.htm>
More information about the erlang-questions
mailing list