setting TField readOnly very slow on oracle 11.2

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lclclc
Posts: 9
Joined: Tue 25 Apr 2006 14:36

setting TField readOnly very slow on oracle 11.2

Post by lclclc » Thu 04 Dec 2014 08:42

we have the following method that is quite fast with oracle 10.2 but becomes very very slow (unusable) if it is used with oracle 11.2.
the line of code where it becomes slow is
DetailTable->Fields->Fields[ i ]->ReadOnly = disabilita;

void __fastcall TConfordi::DisabilitaCampi( bool disabilita )
{
String ls;
//DetailTable is a TSmartQuery
for ( int i = 0; i < DetailTable->FieldCount; i++ )
{
ls = DetailTable->Fields->Fields[ i ]->FieldName.UpperCase();

if ( ( ls != "F_VALID" ) &&
( ls != "DATA_ULTIMA_MODIFICA" ) &&
( ls != "ID_UTENTE" ) &&
( ls!= "DATA_RIENTRO_TINT_PREV" ) &&
( ls!= "COSTO_LAVORAZIONE" ) &&
( ls != "DATA_LAVORAZIONE" ) &&
( ls != "TINTORIA" ) &&
( ls != "DATA_RIENTRO_TINT_PREV1" ) &&
( ls != "COSTO_LAVORAZIONE1" ) &&
( ls != "DATA_LAVORAZIONE1" ) &&
( ls != "TINTORIA1" ) &&
( ls != "DATA_RIENTRO_TINT_PREV2" ) &&
( ls != "COSTO_LAVORAZIONE2" ) &&
( ls!= "DATA_LAVORAZIONE2" ) &&
( ls != "TINTORIA2" ) &&
( ls != "TIPO_LAVORAZIONE1" ) &&
( ls != "TIPO_LAVORAZIONE2" ) &&
( ls != "TIPO_LAVORAZIONE3" ) &&
( ls != "DATA_CONSEGNA" ) &&
( ls != "NO_LABDIP" ) )

DetailTable->Fields->Fields[ i ]->ReadOnly = disabilita;
}
}

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: setting TField readOnly very slow on oracle 11.2

Post by AlexP » Mon 08 Dec 2014 07:07

Hello,

We couldn't reproduce the described problem. Please compose a small simple sample reproducing the problem and send it to alexp*devart*com .

lclclc
Posts: 9
Joined: Tue 25 Apr 2006 14:36

Re: setting TField readOnly very slow on oracle 11.2

Post by lclclc » Tue 09 Dec 2014 10:08

Dear sir.
I found a patch that works in my case
I just set the TOraDataSource->DataSet to which DetailTable is connected to NULL at the beginning of the method and I reset it to DetailTable at the end of the method. With the patch the method is fast again. Thus the problem is due to the connection between the TSmartQuery fields and the controls on the user interface.
Nevertheless I think you still have a problem because the difference in behaviour between version 10.2 and version 11.2 is quite awful.
By the way our version of ODAC is 8.0.2. In any case we are going to upgrade the version to the present one (9.4) in the next days (you will receive an order)

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: setting TField readOnly very slow on oracle 11.2

Post by AlexP » Wed 10 Dec 2014 09:12

As I wrote your earlier, we couldn't reproduce the problem. The performance loss may be due to settings of indexes in tables on different servers.

P.S. Instead of setting the DataSet property to Null you can use the DataSet DisableControls/EnableControls methods.

lclclc
Posts: 9
Joined: Tue 25 Apr 2006 14:36

Re: setting TField readOnly very slow on oracle 11.2

Post by lclclc » Wed 10 Dec 2014 09:34

thank you very much. I will follow your suggestion.
I consider the support request as closed

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: setting TField readOnly very slow on oracle 11.2

Post by AlexP » Thu 11 Dec 2014 06:05

If you have any further questions, feel free to contact us.

Post Reply