Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  ODBC -> PostgreSQL and other

sou
Posted: Tue Jun 19, 2007 3:03 pm Reply with quote
Joined: 19 Jun 2007 Posts: 5
I have the problem, that I can't find out, how I can access a PostgeSQL database.
I've tried to use odbc but I failed. (odbc:connect())
So I looked for a solution by other people and found a doc from ejabberd. I need to intsall jungler but this project is dead?

Well, can you tell me what I have to do?

Thx Cool
View user's profile Send private message
martin
Posted: Tue Jun 19, 2007 4:03 pm Reply with quote
User Joined: 06 Aug 2006 Posts: 11
sou wrote:
I have the problem, that I can't find out, how I can access a PostgeSQL database.
I've tried to use odbc but I failed. (odbc:connect())
So I looked for a solution by other people and found a doc from ejabberd. I need to intsall jungler but this project is dead?

Well, can you tell me what I have to do?

Thx Cool


You can always try out our protocol based based postgres application
http://www.erlang-consulting.com/aboutus/opensource.html

//Martin
Erlang Training & Consulting
http://erlang-consulting.com
View user's profile Send private message
sou
Posted: Wed Jun 20, 2007 12:56 pm Reply with quote
Joined: 19 Jun 2007 Posts: 5
Thx.

I need to solve this problem by using odbc.
Ideas? Very Happy
View user's profile Send private message
anderst
Posted: Wed Jun 20, 2007 1:00 pm Reply with quote
User Joined: 21 Nov 2006 Posts: 37
The OTP ODBC application is not among their best and efficent ones released by Ericsson. That is why many bypass it and write their own drivers or APIs. It does work, however, so the issues on your end must be with configuration. I would check the documentation and not be scared of reading the code to find out what is going wrong.

Jungerl is a repository for erlang developers to contribute their own code. It is alive, contains lots of interesting modules and used by many.

Hilsen,
Anders
View user's profile Send private message Visit poster's website
sou
Posted: Wed Jun 20, 2007 2:13 pm Reply with quote
Joined: 19 Jun 2007 Posts: 5
Well, I know odbc shouldn't be prefered but in this case I need also a way to connect to arbitrary databases such as mysql.

I wondered why I wasn't able to connect by using odbc:connect().
My problem was a wrong connection string and I coudn't find out which arguments I needed to pass.

Solution:
http://www.connectionstrings.com/?carrier=postgresql

Very Happy
View user's profile Send private message
sou
Posted: Wed Jun 20, 2007 2:23 pm Reply with quote
Joined: 19 Jun 2007 Posts: 5
But in future I'll bypass odbc. Wink
View user's profile Send private message
anderst
Posted: Wed Jun 20, 2007 4:56 pm Reply with quote
User Joined: 21 Nov 2006 Posts: 37
When I come across similar errors and the reply is cryptic, the quickest way is to use dbg (see the manual page) and work my way down through the module until I find what is going wrong. Last time I did that was a few years ago. In about an hour, I figured out we had configured the snmp agent to handle v3 vs our system and mibs only managing snmp v1. Others had spent days on it, and only finding where in the code the request was failing helped.
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

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