Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for datetimeoffset? #7

Open
fpauser opened this issue May 19, 2017 · 6 comments
Open

Support for datetimeoffset? #7

fpauser opened this issue May 19, 2017 · 6 comments

Comments

@fpauser
Copy link

fpauser commented May 19, 2017

Querying a table with a datetimeoffset field gives an error: 'Column type not supported'.
Also tested directly with :odbc, error persists:

{:ok, pid} = :odbc.connect(connect_string, [])
{:ok, #PID<0.221.0>}
:odbc.sql_query(pid, 'select date_in from test_table')     
{:error, 'Column type not supported'}

Is it really :odbc.sql_query that does not support datetimeoffset?

@shdblowers
Copy link
Collaborator

Thanks for bringing this to our attention @fpauser. We will investigate further, but I would not be surprised if this column type is not supported by the Erlang ODBC library.

More about datetimeoffset:

Defines a date that is combined with a time of a day that has time zone awareness and is based on a 24-hour clock.

More info on the type on Microsoft Docs.

@fpauser
Copy link
Author

fpauser commented May 21, 2017

Seems like odbc-support for current sqlserver features is quite limited. Not being able to query datetimeoffset columns is a showstopper for me.

@jbachhardie
Copy link

Yeah, the Erland ODBC application has very limited support for non-standard column types. You would need to either patch Erlang OTP or write your own driver to use instead of ODBC. The latter is what https://github.com/livehelpnow/tds tried but that project hasn't been maintained in a long time, which speaks to the complexity of the task.

We unfortunately have no plans to undertake either of these pieces of work but we'll gladly cooperate with anyone who is willing to do so.

@shdblowers
Copy link
Collaborator

I have opened up this issue on the Erlang/OTP bug board. Will try and fix it myself hopefully with a bit of guidance from the OTP maintainers.

@shdblowers
Copy link
Collaborator

@ker2x
Copy link

ker2x commented Dec 11, 2020

hi, i just stumbled upon this issue. FIY, datetimeoffset not supported on python odbc driver either so it's probably not erlang specific :)

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

No branches or pull requests

4 participants