ODBC and OpenBSD (update)

Ingela Anderton ingela@REDACTED
Fri Feb 13 12:57:31 CET 2004


Edmund Dengler wrote:
> (2b) Try to figure out how to get the ODBC stuff working. Had to modify
>      the makefile in .../otp_src_R9C-0/lib to include ODBC as there
>      seemed to be included only if this was a Solaris box. Note that
>      following the instructions in the manual did not seem to work
>      as the ODBC did not install as per the manual.
> (2c) Recompile and install Erlang.
> (2d) Try out sample.
>          erl
>          > application:start(odbc).
>          > {ok, Ref} = odbc:connect("DSN=MyDatabase", []).
> (2e) Get problems ("port_program_executable_not_found"). Determine that
>      this is due to odbcserver not being compiled. Try out Makefile,
>      attempts to compile simply as:
>          cc odbcserver.c -o odbcserver
>      Missing many includes and libraries. Compile by hand using:
>          gcc \
>            -I/opt/unixodbc/2.2.7/include \
>            -I/opt/erlang/9c.0/lib/erlang/lib/erl_interface-3.4/include \
>            -L/opt/unixodbc/2.2.7/lib \
>            -L/opt/erlang/9c.0/lib/erlang/lib/erl_interface-3.4/lib \
> 	   -DMULTITHREAD_UNIX \
> 	   odbcserver.c \
> 	   -lei -lerl_interface -lodbc \
> 	   -pthread \
> 	   -o odbcserver
>      Install into location:
>            mkdir -p /opt/erlang/9c.0/lib/erlang/lib/odbc-1.0.8/priv/bin
>            cp odbcserver /opt/erlang/9c.0/lib/erlang/lib/odbc-1.0.8/priv/

Well this is a little short coming of the odbc application. This is
mainly because it has not had a high enough priority to be fixed,
when there is no paying customer that request it.
OTP only supports odbc for solaris and windows. We have tested it
with oracle and sql-server. But there is no technical reason why it
should not work on other platforms.  

We are planing to put in configure information in the future so that
odbc can be built on all unix-like platforms in the same way as other
applications. However there is a separate Makefile delivered in
...lib/odbc-<ver>/c_src to help compile the application.
You may read about this in the odbc users guide!

Edmund Dengler wrote: 
> I turned on core dumping, and indeed odbcserver was dumping core. I
> fetched and compiled psqlODBC (version 7.3.2) and added this to the
> unixODBC install. With this, I was able to connect to the database, as
> long as I specified [{scrollable_cursors,off}].
My guess is that psqlODBC (version 7.3.2) is a driver that
only supports version 2.X of the ODBC-standard and not 3.0 as the
erlang odbc application is designed for. However as I pointed out
earlier the only function used by the erlang odbc application that seems to
be incompatible with 2.X seems to be the check of what level of support
for scrollable cursors is available in the driver, and if you disable
the use of scrollable cursor there is no need to perform this check.

-- 
/Ingela

Ericsson AB - OTP team






This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.




More information about the erlang-questions mailing list