|
|
| Author |
Message |
< Advanced Erlang/OTP ~ ODBC support doesn't work correctly in Erlang R12B :( |
| Myav |
Posted: Tue Dec 25, 2007 2:46 pm |
|
|
|
Joined: 25 Dec 2007
Posts: 2
|
When I was trying to test my ODBC connection with Erlang R12B I saw these strange error message:
============================================
Erlang (BEAM) emulator version 5.6 [source] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.6 (abort with ^G)
1> odbc:connect("DSN=ejabberd;UID=root;PWD=password", [{scrollable_cursors, off}]).
{error,odbc_not_started}
============================================
But it works properly with R11B.5 with the same configs and software (except Erlang)!
============================================
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.5.5 (abort with ^G)
1> odbc:connect("DSN=ejabberd;UID=root;PWD=password", [{scrollable_cursors, off}]).
=INFO REPORT==== 25-Dec-2007::17:41:34 ===
The odbc application was not started. Has now been started as a temporary application.
{ok,<0.38.0>}
============================================
I use:
Archlinux current
myodbc 3.51.17-1
unixodbc 2.2.12-1
Also I tried to do the same at FreeBSD 6.2 and I saw the same.
odbc.ini:
[ejabberd]
Description = MySQL database test
Driver = /usr/lib/libmyodbc.so
Server = localhost
Database = ejabberd
Port =
Socket = /tmp/mysql.sock
Option =
Stmt = |
|
|
| Back to top |
|
| francesco |
Posted: Wed Jan 16, 2008 5:18 pm |
|
|
|
User
Joined: 07 Jul 2006
Posts: 249
Location: London
|
I have touched ODBC in many many years (We tend to use drivers and socket APIs towards the DBMSses) but I have seen similar problems with other applications inbetween releases. So with a big disclaimer that I could be wrong, your problem might have to do with the fact that in R12, you need to start the ODBC application before you can call it. Use application:start(odbc). The printouts you are getting seem to confirm this.
Why did the oTP team change this? In some older applications, if a call needed an application to be started, it used to start it as part of that call. This was not taking care of tricky issues which might arise because of concurrency: Two processes might be started at the same time and one of the commands fails when a race condition occurs because of registering the process with a static name. So, as they came across similar issues, they were removed one by one.
I am replying from a wireless device and do not have access to the code to verify this is the case with your problem, but it might be worth a shot.
Regards,
Francesco
--
http://www.erlang-consulting.com |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|