Page 1 of 1

Exception during view-read

Posted: Mon 08 Dec 2008 13:00
by Co
when i perform a select on a given view i get: Devart.Data.Oracle.OracleException: ORA-01002: fetch out of sequence

This view is different from other ones in the sense that is a view base on a select where 3 remote tables over a database link are joined

Perfoming a select in sqlplus goes fine..maybe internally in oradirect it is performed in a pl/sql block?(read something obaut cursors causing problems) I also tried performing the select through a stored procedure(and map the result back to an entity but i get the same error)

Posted: Tue 09 Dec 2008 12:56
by AndreyR
I have created a view over two database links and queried it successfully with Entity Framework.
Please give a more detailed description of the problem.

Posted: Tue 09 Dec 2008 14:06
by Co
The view causing the problem is a view over another view(that is a join of 2 remote tables) in a remote database through a database link.(distributed environment)
eg CREATE OR REPLACE VIEW X
AS SELECT * FROM VIEW@dblink;

If i use a view that is a selection of a remote table over a databaselink everything works fine:
eg:CREATE OR REPLACE VIEW X
AS SELECT * FROM TABLE@dblink;


Can you tell me if the oradirect tool creates a pl/sql block in which the data is retrieved? What i find on the oracle-forum is that execution of view-data using db-links with a cursor on it can cause problems. Is this possible due to how the tool works internally?

Posted: Wed 10 Dec 2008 13:15
by AndreyR
I have created a view over dblink, and then another view using dblink over the first view, and queried it successfully.
Could you please create a simple test project illustrating the problem and send it to me (andreyr * devart * com)?
Also please include the script of your DB objects.