Problems with Erlang and ODBC

Laura Castro <>
Mon Jul 22 11:42:55 CEST 2002


  Hello all:

    I'm trying to get Erlang (OTP R7B-4) and PostgreSQL 7.1.3 working
together, using unixODBC 2.2.2 driver. I downloaded postgresql source
code, configured and installed it at ~/postgresql-7.1.3, and also
downloaded unixODBC source code, configured and installed it at
~/unixODBC-2.2.2. Both of them seems to work all right (I can create
SQL-tables from psql prompt, then "select" them via unixODBC, and
vice versa).

    Next I downloaded OTP R7B-4 source code, and again configured and
installed it at ~/otp_R7B-4 this way:

    ./configure --prefix=~/otp_R7B-4 --enable-odbc
    make
    make install

  Those processes doesn't seem to get any errors.

  To get erlang odbc module available, I tried to follow all the steps I
found at:

    http://www.erlang.org/doc/r8b/lib/odbc-0.9.1/doc/html/part_frame.html

  but although I modified ODBCROOT, ODBCLDFLAGS, ODBCLIBS and ODBCINCLUDE,
  then type "make" again in the lib/odbc/src directory and got no errors
  on the process, when I try:

  > basic:start().	or	> utility:start().

  (which are two examples on previously mentioned documentation I
  modified properly to set my DSN, UID and PWD) I get:

	** exited: {undef,[{odbc,start_link,[{local,odbc1},[],[]]},
                   {basic,start,0},
                   {erl_eval,expr,3},
                   {erl_eval,exprs,4},
                   {shell,eval_loop,2}]} **

  Of course, postgresql postmaster is running.

  Searching for a similar problem in erlang mailing-list archives I found
the following:

    http://www.erlang.org/ml-archive/erlang-questions/200012/msg00148.html

  I thought that should be fixed (since it references OTP R7B-1), but it
isn't. The mentioned "Makefile" contains exactly that if-structure. What
surprised me the most was that that mail hadn't got any answer, as it had
been ignored.

  I don't really know what to do. I tried another release (R8B-0), but it
was worse, because I didn't even get a Makefile in which I should modified
the environment variables after first compilation. Any ideas?

  Thank you very much in advance.

	Laura Castro




More information about the erlang-questions mailing list