<div dir="ltr">Hi,<br><br>When i load the mod_spidermonkey command i get all mod_spidermonkey loaded successfully<br><br><a href="mailto:freeswitch@hp30094686650.optimus.co.in">freeswitch@hp30094686650.optimus.co.in</a>><b> load mod_spidermonkey</b><br>
2008-10-20 12:29:46 [CONSOLE] mod_spidermonkey.c:944 sm_load_file() Successfully Loaded [/usr/local/freeswitch/mod/mod_spidermonkey_teletone.so]<br>2008-10-20 12:29:46 [CONSOLE] mod_spidermonkey.c:944 sm_load_file() Successfully Loaded [/usr/local/freeswitch/mod/mod_spidermonkey_core_db.so]<br>
2008-10-20 12:29:46 [CONSOLE] mod_spidermonkey.c:944 sm_load_file() Successfully Loaded [/usr/local/freeswitch/mod/mod_spidermonkey_socket.so]<br>2008-10-20 12:29:46 [CONSOLE] mod_spidermonkey.c:944 sm_load_file() Successfully Loaded [/usr/local/freeswitch/mod/mod_spidermonkey_odbc.so]<br>
2008-10-20 12:29:46 [CONSOLE] switch_loadable_module.c:789 switch_loadable_module_load_file() Successfully Loaded [mod_spidermonkey]<br>2008-10-20 12:29:46 [NOTICE] switch_loadable_module.c:238 switch_loadable_module_process() Adding Application 'javascript'<br>
2008-10-20 12:29:46 [NOTICE] switch_loadable_module.c:258 switch_loadable_module_process() Adding API Function 'jsrun'<br>2008-10-20 12:29:46 [NOTICE] switch_loadable_module.c:258 switch_loadable_module_process() Adding API Function 'jsapi'<br>
API CALL [load(mod_spidermonkey)] output:<br>+OK<br><br>
when i try to run a sample odbc code from freeswitch console like<br>
<a href="mailto:freeswitch@hp30094686650.optimus.co.in">freeswitch@hp30094686650.optimus.co.in</a>><b> jsrun odbc.js</b><br>
<a href="mailto:freeswitch@hp30094686650.optimus.co.in">freeswitch@hp30094686650.optimus.co.in</a>> API CALL [jsrun(odbc.js)] output:<br>
OK<br>
<br>
2008-10-20 12:29:50 [ERR] switch_odbc.c:160
switch_odbc_handle_connect() STATE: IM002 CODE 0 ERROR:
[unixODBC][Driver Manager]Data source name not found, and no default
driver specified<br>
<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [NOTICE] odbc.js:1 console_log() ==============================<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:266 odbc_num_rows() Database is not connected!<br>
2008-10-20 12:29:50 [ERR] mod_spidermonkey_odbc.c:314 odbc_next_row() Database is not connected!<br>
2008-10-20 12:29:50 [NOTICE] odbc.js:1 console_log() ==============================<br><br><b>code is:</b><br>
use("ODBC");<br><br>var people = {};<br>people["authur"] = 30;<br>people["ford"] = 42;<br>people["trillian"] = 29;<br>people["zaphod"] = 304;<br>people["marvin"] = 1000001;<br>
<br><br>db = new ODBC("freeswitch", "optimus", "optimus");<br>db.connect();<br><br>db.exec("create table demo (name varchar(255), age varchar(80));");<br><br>for (var i in people) {<br>
sql = "insert into demo values('" + i + "', " + people[i] + ");";<br> console_log("debug", sql + "\n");<br> db.exec(sql);<br>}<br><br>sql = "select * from demo;";<br>
var line = "==============================\n";<br><br>console_log("notice", line);<br><br>db.exec(sql);<br><br>console_log("debug", "row count: " + db.numRows() + "\n");<br>
<br>while(db.nextRow()) {<br> var row = db.getData();<br><br> for (var i in row) {<br> console_log("debug", "[" + i + "] = [" + row[i] + "]\n");<br> }<br><br> console_log("debug", "\n");<br>
}<br><br>console_log("notice", line);<br><br><div id=":108" class="ArwC7c ckChnd">what should i specify in DSN.here i gave freeswitch which is a database<br>
name.please assist me to solve this problem<br></div><br>-- <br>Warm Regards,<br>N.Baskar<br><br>
</div>