Hi All,<div><br></div><div>I have find reason of problem with UnixOdbc (with Oracle). When we are using freeswitch with ODBC support before executing a sql query it run a test query "Select 1" which works at MYSQL but didn't work at ORACLE. This change should be in switch_odbc.c file. Please someone raise it as a minor bug so that it can be fixed in next releases.</div>
<div><br clear="all">Best Regards,<br>Rajesh Bansal<br><br>
<br><br><div class="gmail_quote">On Mon, Jan 10, 2011 at 1:39 PM, Rajesh Bansal <span dir="ltr"><<a href="mailto:bansal.rajeshkr@gmail.com">bansal.rajeshkr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Steve,<div><br></div><div>I am using following sample code.</div><div><br></div><div><div>use("ODBC");</div><div><br></div><div>var dsn = "rajesh_dsn";</div><div>var db_user = "avc";</div>
<div>var db_pass = "avc";</div><div>var db = new ODBC(dsn, db_user, db_pass);</div><div>var sql = "select sysdate from dual";</div><div><br></div><div>console_log("info","\nbefore connect with DB\n");</div>
<div><br></div><div>if(db.connect())</div><div>{</div><div>if(session.ready())</div><div> session.answer();</div><div>console_log("info","\n\nafter connect with DB\n");</div><div><br></div><div>if (db.exec(sql))</div>
<div> session.hangup(); //might want to say something nice instead.</div><div>else</div><div> console_log("info","\n\nconnect with DB\n");</div><div>while (db.nextRow())</div><div>{</div>
<div> row = db.getData();</div><div> console_log("info", "UserName: " );</div><div>}}</div><div>else</div><div><br></div><div>console_log("info","\n\nunable to connect with DB\n");</div>
<div><br></div>Best Regards,<br><font color="#888888">Rajesh Bansal</font><div><div></div><div class="h5"><br><br>
<br><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 11:35 PM, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sounds like a SQL syntax error - can you show us the code that's<br>
executing the statement that gives the error?<br>
<br>
Specifically Oracle is complaining about not finding FROM where it<br>
expects to in the SELECT.<br>
<br>
-Steve<br>
<div><div></div><div><br>
<br>
On 7 January 2011 15:15, Rajesh Bansal <<a href="mailto:bansal.rajeshkr@gmail.com" target="_blank">bansal.rajeshkr@gmail.com</a>> wrote:<br>
> Hi ,<br>
> I am getting error ORA -923 (from missing from statement) when i am tring to<br>
> execute a sql query from Javascript file. Here i am successfully able to<br>
> connect & execute queries with MYSQL. But in oracle connection i am getting<br>
> this error even i can successfully make a connection with oracle. with isql<br>
> & a program written in C i can connect and execute queries ok.<br>
> I am using<br>
> FreeSwitch 1.0.6<br>
> unixOdbc 2.3.0<br>
> Please tell me where is problem.<br>
> Best Regards,<br>
> Rajesh Bansal<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>