[Freeswitch-users] Getting Error ORA-923 in oracle query execution

Rajesh Bansal bansal.rajeshkr at gmail.com
Mon Jan 10 14:39:40 MSK 2011


Hi All,

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.

Best Regards,
Rajesh Bansal



On Mon, Jan 10, 2011 at 1:39 PM, Rajesh Bansal <bansal.rajeshkr at gmail.com>wrote:

> Hi Steve,
>
> I am using following sample code.
>
> use("ODBC");
>
> var dsn     = "rajesh_dsn";
> var db_user = "avc";
> var db_pass = "avc";
> var db      = new ODBC(dsn, db_user, db_pass);
> var sql = "select sysdate  from dual";
>
> console_log("info","\nbefore connect with DB\n");
>
> if(db.connect())
> {
> if(session.ready())
>  session.answer();
> console_log("info","\n\nafter connect with DB\n");
>
> if (db.exec(sql))
>         session.hangup(); //might want to say something nice instead.
> else
>         console_log("info","\n\nconnect with DB\n");
> while (db.nextRow())
> {
>   row = db.getData();
>   console_log("info", "UserName: " );
> }}
> else
>
> console_log("info","\n\nunable to connect with DB\n");
>
> Best Regards,
> Rajesh Bansal
>
>
>
>
> On Fri, Jan 7, 2011 at 11:35 PM, Steven Ayre <steveayre at gmail.com> wrote:
>
>> Sounds like a SQL syntax error - can you show us the code that's
>> executing the statement that gives the error?
>>
>> Specifically Oracle is complaining about not finding FROM where it
>> expects to in the SELECT.
>>
>> -Steve
>>
>>
>> On 7 January 2011 15:15, Rajesh Bansal <bansal.rajeshkr at gmail.com> wrote:
>> > Hi ,
>> > I am getting error ORA -923 (from missing from statement) when i am
>> tring to
>> > execute a sql query from Javascript file. Here i am successfully able to
>> > connect & execute queries with MYSQL. But in oracle connection i am
>> getting
>> > this error even i can successfully make a connection with oracle. with
>> isql
>> > & a program written in C i can connect and execute queries ok.
>> > I am using
>> > FreeSwitch 1.0.6
>> > unixOdbc    2.3.0
>> > Please tell me where is problem.
>> > Best Regards,
>> > Rajesh Bansal
>> >
>> >
>> > _______________________________________________
>> > FreeSWITCH-users mailing list
>> > FreeSWITCH-users at lists.freeswitch.org
>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> > UNSUBSCRIBE:
>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>> > http://www.freeswitch.org
>> >
>> >
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110110/6134f1e3/attachment-0001.html 


More information about the FreeSWITCH-users mailing list