[erlang-questions] Interfacing Erlang to Oracle
Ingela Anderton Andin
ingela@REDACTED
Thu Dec 18 11:49:18 CET 2008
>>> Can anyone shed any light on best practice for interfacing Erlang to
>>> an Oracle DBMS?
>>>
>> ODBC works for me.
>>
>
> I tried to get Erlang + Linux + ODBC + Oracle to work about six months
> ago, but it acted extremely flaky and I eventually gave up.
>
> It seemed like there was only one possible error message I could get:
> {error,"No SQL-driver information available."}
>
> I'd get that if any of a hundred different things in my conf was not
> perfect, or even if I was connected but had a syntax error in an SQL
> statement, or sometimes it would just show up randomly. For example
> would I sometimes get that error as the result of an insert, even when
> the insert was actually successful.
>
>
Erlang odbc will return the message {error,"No SQL-driver information
available."} when ever a
call to the odbc-driver fails or returns something unexpected and the
driver is not polite enough to provide any information to what might
have gone wrong. So how often you get that depends very much on your
driver. The odbc standard will also some times be a little vague leaving
room for different drivers
to behave differently in the same situation this has caused some
problems where an error message has been returned even though all is well.
Alas we do not have the time or financing to test all available
odbc-drivers. The best driver in my experience is Microsofts driver
for sql-server,
no big surprise as odbc is a Microsoft standard. We mainly use unixodbc
for testing on linux/unix and it works well for us.
Also in my experience many odbc-drivers for linux are based on an old
version of the standard and because of that you have to disable scrollable
cursors if you want to make it work. If anybody finds an issue with
there driver and a solution for it they are welcome to submit a
patch-suggestion.
Regards Ingela Erlang/OTP - Ericsson
More information about the erlang-questions
mailing list