<div dir="ltr">it&#39;s freeswitch.Dbh with a capital D.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 3:03 AM, Artur Mega <span dir="ltr">&lt;<a href="mailto:findmeinwland@gmail.com" target="_blank">findmeinwland@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default">Hello everybody,<br>How can i connect to postgres database from lua through freeswitch.dbh ? <br><br><div class="gmail_default">I tried</div><div class="gmail_default">local dbh = freeswitch.dbh(&quot;pgsql://hostaddr=127.0.0.1 dbname=some_db user=uname password=&#39;passwd&#39;&quot;) -- returns nil</div><div class="gmail_default">local dbh = freeswitch.dbh(&quot;odbc://some_db:uname:passwd&quot;) -- returns nil too</div><div class="gmail_default"><br></div><div class="gmail_default">Also I set up ODBS with PostgreSQL driver. If I run this command in console:</div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre-wrap">        </span>isql some_db uname passwd</div><div class="gmail_default"><br></div><div class="gmail_default">then I can successfully connect to my database. What am i doing wrong? Also I tried to link odbc*.ini files for freeswitch:</div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre-wrap">        </span>mkdir /usr/local/freeswitch/etc</div><div class="gmail_default"><span style="white-space:pre-wrap">        </span>ln -s /etc/odbcinst.ini /usr/local/freeswitch/etc/odbcinst.ini</div><div class="gmail_default"><span style="white-space:pre-wrap">        </span>ln -s /etc/odbc.ini /usr/local/freeswitch/etc/odbc.ini</div><div class="gmail_default"><br></div><div class="gmail_default">but it doesn&#39;t help too. Thanks in advance.</div></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div><br>Arthur</div></div></div></div>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div>