In my oracle db I have function:
it is returning ref cursor with 4 fields.
so I created datasource:
and trying to show it in a listgrid:
and on run i get this:
Function actually works fine in our flex project and also in my SmartGWT LGPL test project, where I used plain JDBC/OraclePrepared statement to get result set and then converted it to Record[] to feed grids.
What is wrong with it? Where I should look for troublemaker?
* And one more question - is it the right way to call function? "call krks2_vik_app.get_object_tree()" was resulting in "ORA-06576:
not a valid function or procedure name"
I am using "SmartClient Version: v8.3_2012-11-20/EVAL Deployment (expires 2013.01.19_05.13.53) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)"
Code:
function get_object_tree return sys_refcursor is v_res sys_refcursor; begin ....lot of comlicated pl/sql return v_res; end;
so I created datasource:
Code:
<DataSource ID="objectTree" dataFormat="iscServer" serverType="sql" dataSourceVersion="1"> <fields> <field name="NPARENT_KEY" type="FLOAT " title="parentKey"/> <field name="NKEY" type="FLOAT " title="IdKey" primaryKey="true"/> <field name="CNAME" type="TEXT " title="objectName"/> <field name="NLEVEL" type="INTEGER " title="treeLevel"/> </fields> <allowAdvancedCriteria>false</allowAdvancedCriteria> <operationBindings> <operationBinding operationId="getTree" operationType="fetch"> <customSQL>select krks2_vik_app.get_object_tree from dual</customSQL> </operationBinding> </operationBindings> </DataSource>
and trying to show it in a listgrid:
Code:
VLayout layout = new VLayout(); layout.setHeight100(); layout.setWidth100(); ListGrid grid = new ListGrid(); grid.setHeight100(); grid.setWidth100(); grid.setDataSource(DataSource.get("objectTree")); grid.setFetchOperation("getTree"); grid.fetchData(); layout.addMember(grid); layout.draw();
Code:
=== 2013-01-30 23:47:40,712 [l0-0] DEBUG DataTools - Bean inspection: invocation of oracle.jdbc.driver.OracleResultSetImpl.getFetchSize() while trying to obtain property 'fetchSize' threw an exception: java.lang.IllegalAccessException: Class com.isomorphic.util.DataTools can not access a member of class oracle.jdbc.driver.OracleResultSetImpl with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
What is wrong with it? Where I should look for troublemaker?
* And one more question - is it the right way to call function? "call krks2_vik_app.get_object_tree()" was resulting in "ORA-06576:
not a valid function or procedure name"
I am using "SmartClient Version: v8.3_2012-11-20/EVAL Deployment (expires 2013.01.19_05.13.53) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)"
Comment