thanks Mr. Muhammad Shahzad for the reply but issue is that when i use to access database on console there it works fine but when i use in dialplan here it not works
[root@localhost includes]# isql -v freeswitch
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> use test;
SQLRowCount returns 0
SQL> select * from tb_accounts;
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
| id | name | cash |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
| 1 | shahzad | 10 |
| 2 | saeed | 50 |
| 3 | usman | 10 |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
SQLRowCount returns 3
3 rows fetched
SQL> update tb_accounts set cash = cash -1 where id =1;
SQLRowCount returns 1
SQL> select * from tb_accounts;
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
| id | name | cash |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
| 1 | shahzad | 9 |
| 2 | saeed | 50 |
| 3 | usman | 10 |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+
SQLRowCount returns 3
3 rows fetched
here u can see that update is also working, and here is my dialplan xml
<document type="freeswitch/xml">
<section name="dialplan" description="RE Dial Plan For FreeSwitch">
<context name="public">
<extension name="checkBalance">
<condition field="destination_number" expression="^126$">
<action application="set" data="nibble_rate=0.03"/>
<action application="set" data="nibble_account=1"/>
<action application="answer"/>
<action application="hangup"/>
</condition>
</extension>
</context>
</section>
</document>
i also check that the user and password and database is also correct.