TSQLServer::Connect() with ODBC


_ROOT Version: 6.24/06
Platform: win32
Compiler: MSVC 19.23.28107.0


TSQLServer* srv = TSQLServer::Connect(“odbcn://ERT6”,0,0) works well under ROOT 5.34/32 and returns a valid pointer, the same command returns a nullptr under root 6.24/06.
Has the syntax changed?


Sorry, but AFAIK, this has not been tested on Windows, but maybe @linev knows if something changed in the code…

Hi,

There were no changes in ODBC plugin since a long time.
Did you compile it with ROOT6?

Can you check if there is libRODBC.dll library?

Regards,
Sergey

Hi Sergey,
I downloaded a pre-compiled binary distribution of root 6.24/06. I tried to connect with the SQL server in an interactive session (see screen shots above).
I could not find libRODBC.dll in C:\root_v6.24.06\bin
Thanks for your help!
Best regards,
Reiner

Hi Reiner,

Means to get ODBC functionality in ROOT6, you need to compile from source, enabling -Dodbc=ON. Most probably, you will need to install windows ODBC library and correspondent include files.

Regards,
Sergey

And if you decide to try - here you will find more info how ROOT search ODBC:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.