Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 7 of 7 total |
DBISAM 4 not compatible with DevExpress Quantum Grid? |
Fri, Oct 12 2007 11:22 AM | Permanent Link |
"Renato Portello" | I have just ordered DBISAM 4 to upgrade one application.
The application start, but when I click on the grid I get an exception EInvalidCast. After some research I found that DevExpress access the property Params o= f the query as an TParams, but DBISAM use an TDBISAMParams that is incompatible. An example of function from DevExpress that use the standard TParams: ------------------------------------------------------------------------= ----- function TcxDBProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant): Boolean; var AParams: TParams; begin Result :=3D False; if IsPublishedProp(ADataSet, 'Params') then begin AParams :=3D GetObjectProp(ADataSet, 'Params') as TParams; if AParams <> nil then begin if VarEquals(AParams.ParamValues[AParamNames], AParamValues) the= n Result :=3D True; end; end; end; ------------------------------------------------------------------------= ----- It seems that for me DBISAM 4 is a no way. Thanks Renato Portello -- = Creato con il rivoluzionario client e-mail di Opera: = http://www.opera.com/mail/ |
Fri, Oct 12 2007 1:00 PM | Permanent Link |
"J. B. Ferguson" | Works fine for me. I have used Quantum Grid v4, v5 and now v6 with
DBISAM v4.x and all have worked with no problems at all. -- Regards, Jan Ferguson Renato Portello wrote: <<I have just ordered DBISAM 4 to upgrade one application. << <<The application start, but when I click on the grid I get an exception <<EInvalidCast. << <<It seems that for me DBISAM 4 is a no way. |
Fri, Oct 12 2007 1:14 PM | Permanent Link |
"Robert" | "J. B. Ferguson" <jbNOSPAMfergusonATgmailDOTcom> wrote in message news:FE826801-9CE5-456E-9830-2AB27BCBA257@news.elevatesoft.com... > Works fine for me. I have used Quantum Grid v4, v5 and now v6 with > DBISAM v4.x and all have worked with no problems at all. > I think "upgrade" is the keyword there. The parameters changed from V3 to V4. Unfortunately, I don't have the grid so I don't know how to fix the problem. It should not be that different than when upgrading a tQuery. Robert |
Fri, Oct 12 2007 3:29 PM | Permanent Link |
"Renato Portello" | In data 12 ottobre 2007 alle ore 20:00:10, J. B. Ferguson
<jbNOSPAMfergusonATgmailDOTcom> ha scritto: > Works fine for me. I have used Quantum Grid v4, v5 and now v6 with > DBISAM v4.x and all have worked with no problems at all. > The problem appear only when you use a master-detail grid. If you set the DataController DetailInSQLMode to true the grid reopen the detail query for every record of the master, and before it try to set the value of the key trough the Param property. For what I can see the only other way to make a master-detail grid is by open the detail query for all the record, and than the grid use the locate method. But I don't think this is a good way. Regards, Renato -- Creato con il rivoluzionario client e-mail di Opera: http://www.opera.com/mail/ |
Fri, Oct 12 2007 6:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Renato,
<< After some research I found that DevExpress access the property Params of the query as an TParams, but DBISAM use an TDBISAMParams that is incompatible. >> The workaround is to change the DevExpress code as follows: function TcxDBProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant): Boolean; var AParams: TDBISAMParams; begin Result := False; if IsPublishedProp(ADataSet, 'Params') then begin AParams := GetObjectProp(ADataSet, 'Params') as TDBISAMParams; if AParams <> nil then begin if VarEquals(AParams.ParamValues[AParamNames], AParamValues) then Result := True; end; end; end; -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 12 2007 7:43 PM | Permanent Link |
"Renato Portello" | In data 13 ottobre 2007 alle ore 01:29:41, Tim Young [Elevate Software] =
= <timyoung@elevatesoft.com> ha scritto: > Renato, > > << After some research I found that DevExpress access the property = > Params of > the query as an TParams, but DBISAM use an TDBISAMParams that is > incompatible. >> > > The workaround is to change the DevExpress code as follows: > > function TcxDBProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: > TDataSet; > const AParamNames: string; const AParamValues: Variant): Boolean; > var > AParams: TDBISAMParams; > begin > Result :=3D False; > if IsPublishedProp(ADataSet, 'Params') then > begin > AParams :=3D GetObjectProp(ADataSet, 'Params') as TDBISAMParams;= > if AParams <> nil then > begin > if VarEquals(AParams.ParamValues[AParamNames], AParamValues) t= hen > Result :=3D True; > end; > end; > end; > Is not that simple, with that change my other project that use a differe= nt = database will stop working. first I must change the code so it check the type of the Params and = typecast it accordly, and I must verify all the devexpress code for othe= r = istance of the same type of code. Second I must make devExepress dependent on the DBISAM unit, not really = a = elegant thing. And at last I must redo all the work every time DevExpress make availabl= e = an update. I think that your solution of modify the Params property is wrong, it = broke the OO principle of inheritance in that you changed the interface = of = the class and made it not compatible. You should have made TDBISAMParams descendant of TParams to respect the = = rule. Regards Renato Portello -- = Creato con il rivoluzionario client e-mail di Opera: = http://www.opera.com/mail/ |
Mon, Oct 15 2007 4:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Renato,
<< I think that your solution of modify the Params property is wrong, it broke the OO principle of inheritance in that you changed the interface of the class and made it not compatible. You should have made TDBISAMParams descendant of TParams to respect the rule. >> The issue was that there are several issues with the TParams that cause them to not work as needed with DBISAM, and the issues were all in parts of the TParams that don't allow for overriding their behavior. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, April 17, 2024 at 10:35 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |