error - Cannot perform this operation on an open dataset

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
db1-seiji
Posts: 1
Joined: Mon 14 Apr 2008 13:35

error - Cannot perform this operation on an open dataset

Post by db1-seiji » Mon 14 Apr 2008 13:49

Hi people

I found a prob i am using Win XP SP2, Delphi 7 update 2, Oracle 10, DBExpress component, Core lab DBXOda 4.2

when a try to use a SqlQuery named as qryGenerica linked with cdsGenerica, i set cdsGenerica.commandtext := ' Select aFunction(1) from dual ' and cdsGenerica.Open

--------
CREATE OR REPLACE FUNCTION aFunction(a NUMBER) RETURN NUMBER IS
BEGIN
raise_application_error(-20500, 'aFunction');
RETURN a;
end aFunction;
--------
it returns a exception.
After this i try to use the same cdsGenerica again... like cdsGenerica.commandtext := ' Select 1 from dual ' and cdsGenerica.Open

i got this error "Cannot perform this operation on an open dataset"

if i change the SqlConnection.ConnectionName Oracle "(Core Lab)" to "OracleConnection" it works.

Any help?
Thank you.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 16 Apr 2008 07:49

We cannot reproduce the problem. When I set a value to CommandText property of TClientDataSet component, and try to open it, an exception 'CommandText changes are not allowed' is raised.

You can assign a SQL text to SQL property of TSQLQuery component.

Post Reply