[erlang-questions] Erlang ODBC Tips

30 views
Skip to first unread message

Cole Fichter

unread,
Oct 11, 2014, 2:56:33 PM10/11/14
to erlang-q...@erlang.org
Hi everyone,

There isn't a lot of helpful information available about using ODBC to connect to SQL from Erlang, so I've written a short field guide with helpful advice and tips:


I hope this helps others in the future, and would appreciate any feedback you can provide.


Cheers,

Cole Fichter

Ola Bäckström

unread,
Oct 13, 2014, 2:26:47 AM10/13/14
to erlang-q...@erlang.org, Cole Fichter

Nice!

 

I’d suggest you to rename “64-Bit/32-Bit Architecture Mismatch” by adding “… in Windows”.

Also there’s some typo: ‘Canada’ - it should be a string.

 

/Ola

Cole Fichter

unread,
Oct 13, 2014, 4:10:39 PM10/13/14
to Ola Bäckström, erlang-q...@erlang.org
Ah, thanks! I've fixed the string issue.

My experience with Erlang has mostly been on Windows (as you might be able to tell from the guide). Do you know if others use ODBC on different platforms? I had kind of assumed there were better libraries to connect to, say, MySQL than ODBC.


Cheers,

Cole

Ola Bäckström

unread,
Oct 14, 2014, 3:01:01 AM10/14/14
to erlang-q...@erlang.org, Cole Fichter

The odbc module included in Erlang/OTP can be used in Linux in conjunction with the Microsoft Linux odbc driver.

I know it can be used to query an MS SQL server (running under Windows).

 

/Ola

Andy Richards

unread,
Oct 14, 2014, 4:30:17 AM10/14/14
to erlang-pr...@googlegroups.com, erlang-q...@erlang.org, cole.f...@gmail.com, ola.ba...@loxysoft.se
Yes as Ola suggested you can use unixODBC [1] and the Microsoft ODBC Driver for Linux [2] to connect to MS SqlServer from unix. You may find this [3] blog post useful also.

[1] http://www.unixodbc.org/
[2] http://msdn.microsoft.com/en-us/library/hh568451(v=sql.110).aspx
[3] http://romenlaw.blogspot.co.uk/2008/10/erlang-odbc.html

Andy.

Garry Hodgson

unread,
Oct 14, 2014, 10:23:07 AM10/14/14
to Cole Fichter, Ola Bäckström, erlang-q...@erlang.org
we've had to use it on linux to talk to databases on windows platforms.
it wasn't fun.
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Garrett Smith

unread,
Oct 14, 2014, 11:25:21 AM10/14/14
to Garry Hodgson, Cole Fichter, erlang-q...@erlang.org
I saw Linux <-> Windows + SQL Server over ODBC working the other week.
Like seeing a snipe! [1]

[1] http://en.wikipedia.org/wiki/Snipe_hunt

Reply all
Reply to author
Forward
0 new messages