Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Problem with Devexpress and Delphi 2007
Problem with Devexpress and Delphi 2007
Posted: 2007/07/04 22:31
 
Hi,
I have this problem related to ADParams.

Wherever I have a Grid with a detail level I get "Invalid class typecast" in design time.

The problem does not show up in runtime.

sometime I have to restart the whole delphi cause I cannot do anything or move to another part of the delphi because of this error.

I think we need a Adaptor for D11
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/07/04 23:29
 
Hello

What is your QGrid version ?

Regards,
Dmitry
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/07/05 05:21
 
ExpressQuantumGrid 6.26
the problem happens when I have the detail as a parametrized query.
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/07/09 06:47
 
Ok, I will check.

Regards,
Dmitry
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/07/12 02:44
 
Thank you for your time
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/08/02 05:32
 
Hi, i have the same problem using D2006 with Quantum grid and details.
The invalid type cast error arises when you use the details in sql mode. This is because, cxgrids try to get the Params property as TParam but they are TADParams. Both inherits from TCollection but they are not the same class and thats why this exception happens.

You can check this in the cxDBData unit, in TcxDBProviderDetailFilterAdapter.ReopenSQL

The code is something like this

var
AParams: TParams;
begin
if IsPublishedProp(ADataSet, 'Params') then
begin
AParams := GetObjectProp(ADataSet, 'Params') as TParams; <--- here
if AParams <> nil then
begin
....

Regards!
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/08/02 05:34
 
I think that you can solve it temporarily using a TClientDataset with a provider linked to the query

Regards
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/08/02 06:06
 
Hello

You should check AnyDACADDONDevEx folder. It contains AnyDAC adapters for DevEx. Choose there appropriate for your Delphi version package and install it.

Regards,
Dmitry
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/08/07 23:32
 
Hi,
I have used the files in that folder although there is nothing for delphi 2007.
I tried to use Delphi 7 files, but unfortunately they did not work for delphi 2007
(how should I install them? just a standard compile?)

I have changed codes in devexpress to solve the problem, but I think there must be other ways to solve it
Re:Problem with Devexpress and Delphi 2007
Posted: 2007/08/07 23:39
 
Take cxADAdaptersD10.dpk, open it in notepad and adjust RQUIRES clause:

 requires   rtl,    dbrtl,   adortl,   cxDataD10,   daADCompD10;



Sorry, at moment I does not have D2007. But I does not think, there will be other issues ...