TOraSession.Options.Net and TOraQuery.Options.AutoClose

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

TOraSession.Options.Net and TOraQuery.Options.AutoClose

Post by Legion » Tue 07 Nov 2006 14:35

If Net option is TRUE, AutoClose working properly or not?

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

Post by Plash » Wed 08 Nov 2006 13:21

The AutoClose option of TOraQuery works properly with Net option.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Wed 08 Nov 2006 18:10

AutoClose - TOraDataSet will close OCI cursor after fetching all rows. Allows to reduce the number of opened cursors on the server.
In designer

Code: Select all

AutoClose is True, FetchAll is True,
OraSquery.SQL (TabCursor parameter type is Cursor)
begin
 Pkg.Prc(:TabCursor); 
end;
In runtime

Code: Select all

OraQuery.Open; OraQuery.Close; OraQuery.Open;
This code, if NET is False, not increase number of opened cursors on server, otherwise, cursor number increased

Code: Select all

select count(*) from sys.v_$open_cursor;

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

Post by Plash » Thu 09 Nov 2006 10:32

We cannot reproduce the problem.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Mon 13 Nov 2006 13:40

I send my test to support mail.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Wed 15 Nov 2006 10:47

What's about my test project?

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

Post by Plash » Thu 16 Nov 2006 13:01

We have not received your e-mail. Please send your test project to [email protected] again.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Mon 20 Nov 2006 17:01

I send my test to [email protected]

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Fri 24 Nov 2006 10:29

I wait answer...
If you not recieved my mail again, I upload my test here:
http://rapidshare.com/files/4615278/Test.zip.html

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

Post by Plash » Fri 24 Nov 2006 15:13

We have not received your e-mail and we cannot download your test project from the link that you have specified.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Fri 24 Nov 2006 16:54


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

Post by Plash » Mon 27 Nov 2006 13:49

We have tested your project. The AutoClose option doesn't work correctly because you set AutoPrepare and KeepPrepared options for the query component. These options conflict with AutoClose when using REF CURSOR.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Mon 27 Nov 2006 16:02

plash wrote:The AutoClose option doesn't work correctly because you set AutoPrepare and KeepPrepared options for the query component. These options conflict with AutoClose when using REF CURSOR.
What should be a correct combination of options in this case?

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

Post by Plash » Tue 28 Nov 2006 10:02

Set the AutoClose option to True, AutoPrepare and KeepPrepared options to False.

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

Post by Plash » Tue 28 Nov 2006 10:51

We have fixed the problem with preparing. The fix will be included in the next build of ODAC.

But we don't recommend preparing ODAC datasets with a PL/SQL statement returning REF CURSOR. When you prepare such dataset, the query is executed to get the list of fields. When you open, the dataset it is executed the second time. So if you prepare the dataset with a PL/SQL statement returning REF CURSOR it is executed twice.

Post Reply