<div dir="ltr"><span style="background-color: rgb(255, 255, 255);">Hi to all, <br>I could not able to connect to mySql using Dbh. Here is the coding I have used to connect to my db. <br></span><b style="background-color: rgb(255, 204, 204);"><br>
local dbh = assert(freeswitch.Dbh("dsn_name","venkat","venkat123"))</b><br clear="all"><br>I am getting following error while executing the lua test.lua in fs_cli <br><br><span style="background-color: rgb(255, 255, 153);">2010-09-29 17:57:29.924498 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/test.lua:23: attempt to call field 'Dbh' (a nil value)</span><br style="background-color: rgb(255, 255, 153);">
<span style="background-color: rgb(255, 255, 153);">stack traceback: /usr/local/freeswitch/scripts/test.lua:23: in main chunk</span><br><br><b>/etc/odbc.ini</b> file contains <br><br>[dsn_name]<br>Driver=MySQL<br>SERVER=localhost<br>
PORT=3306<br>USER=venkat<br>PASSWORD=venkat123<br>DATABASE=venkat<br>Socket = /var/lib/mysql/mysql.sock<br><br><b>I can able to connect to my db using following command </b><br><br><span style="background-color: rgb(255, 255, 153);">isql dsn_name venkat venkat123</span><br>
<br>I trying to figure it out for past two days and gone though wiki not able to crack it. Any one please help me to resolve my issue. <br><br><br>-- <br><div dir="ltr"><br>Regards<br>Venkatesan OV.</div><br>
</div>