<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm experimenting with spidermonkey for JavaScript call control, the basics seem fine and I'm now trying to connect to an existing Firebird database, the Firebird odbc lib is installed ok as is unixODBC and I can confirm this and access the db no problem with isql, something strange happens though when I connect in spidermonkey, basically the odbc connection is made successfully, but then as soon as I call either exec or query the odbc connection starts to drop and re-connect continuously, </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the isql output is below </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>isql -v test<BR>+---------------------------------------+<BR>| Connected! |<BR>| |<BR>| sql-statement |<BR>| help [tablename] |<BR>| quit |<BR>| |<BR>+---------------------------------------+<BR>SQL> select first 1 * from pool_phones<BR>+---------------------+------------+<BR>| GSMNO | ORGNO |<BR>+---------------------+------------+<BR>| 0712345678 | 1 |<BR>+---------------------+------------+<BR>SQLRowCount returns 1<BR>1 rows fetched<BR>SQL><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>however the following test code calling the same query</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>use("ODBC");</FONT></DIV>
<DIV><FONT face=Arial size=2>var db = new ODBC("test","SYSDBA","masterkey");<BR>db.connect();<BR>db.query("select first 1 * from pool_phones");</FONT></DIV>
<DIV><FONT face=Arial size=2>db.nextRow();</FONT></DIV>
<DIV><FONT face=Arial size=2>row = db.getData();<BR>console_log("INFO","HELLO " + row["GSMNO"] + "\n");</FONT></DIV>
<DIV><FONT face=Arial size=2>exit();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>gives the following output and then just loops disconnecting and reconnecting until I shutdown freeswitch<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>2008-02-18 23:26:03 [DEBUG] switch_core_state_machine.c:144 switch_core_standard_on_execute() </FONT><A href="mailto:sofia/default/1000@192.168.0.7:5060"><FONT face=Arial size=2>sofia/default/1000@192.168.0.7:5060</FONT></A><FONT face=Arial size=2> Execute javascript(/usr/scripts/test1.js)<BR>2008-02-18 23:26:03 [DEBUG] mod_spidermonkey.c:3150 js_api_use() Loading ODBC<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:145 switch_odbc_handle_connect() Connecting test<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:174 switch_odbc_handle_connect() Connected to [test]<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:95 switch_odbc_handle_disconnect() Disconnected 0 from [test]<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:142 switch_odbc_handle_connect() Re-connecting test<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:145 switch_odbc_handle_connect() Connecting test<BR>2008-02-18 23:26:03 [DEBUG] switch_odbc.c:174 switch_odbc_handle_connect() Connected to [test]<BR>2008-02-18 23:26:03 [CRIT] switch_odbc.c:234 db_is_up() The sql server is not responding for DSN test []<BR>2008-02-18 23:26:03 [INFO] switch_odbc.c:239 db_is_up() The connection has been re-established</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<P><FONT face=Arial size=2>Any ideas much appreciated</FONT></P>
<P><FONT face=Arial size=2>Thanks</FONT></P>
<P><FONT face=Arial size=2>Steve</FONT></P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT face=Arial size=2> </P>
<DIV><BR><BR></DIV></FONT>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>