![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 6 of 6 total |
![]() |
Thu, May 3 2007 4:38 PM | Permanent Link |
=?iso-8859-1?Q?Luis_Concepci=F3n?= | Hi!
I'm using DBISAM 4.25 and Delphi7, C/S mode and internet access 1) I have a DBGrid showing some records, and some DBEdits, DBDateEdits and a DBLookUpCombobox to show current record aditional data. 2) DBLookUpComboBox.ListSource is another remote (and opened) table. 3) When I scroll or click another record in the DBGrid (move from one record to another), it takes about 5 seconds to set the cursor on the new record. If I deactivate the DBLookUpComboBox, the scroll is instantaneous. It seems that, when changing the current record, it makes a 'locate' to second table. Is it possible to increase the speed? Maybe using a independent Query for lookup table? Any way to deactivate lookup locate? Thanks! |
Fri, May 4 2007 2:51 AM | Permanent Link |
Bruno Krayenbuhl | If I deactivate the DBLookUpComboBox, the scroll is instantaneous.
It seems that, when changing the current record, it makes a 'locate' to second table. Luis, I have been banging on this issue for 2 weeks now. (BDS 2006) The problem comes from the DBLookUpComboBox. Suppose you have a table (limited for explanation) that goes like this Fields([(IsJob, ftBoolean), (JobKey, ftString[6]), (CustJobKey, ftString[6]), (Other data ...)]) IxCust : Index(IsJob, JobKey) -> SetRange IsJob=False in DBLookUpComboBox.ListSource.DataSet IxJob : Index(CustJobKey, IsJob, JobKey) -> No Range for a matching DBGrid You cannot specify multiple KeyFields for the DBLookUpComboBox.ListSource.KeyField so you will have indicated DataField=CustJobKey and KeyField=JobKey. What happens is that DBLookUpComboBox (DBCtrls.TDDBLookupControl for that matter) tries to match JobKey with the first field of Index IxCust which is of type ftBoolean and is a mismatch of FieldType SO Locates (in DBCtrls.TDBLookupControl.LocateKey and DBCtrls.TDBLookupControl.ProcessSearchKey) by default will scan all the rows of the table to find a corresponding CustJobKey. If the table has something like more than a hundred records you'll fill it badly. In fact DBLookUpComboBox is generally very ill. It will make at least to or three locates (even simple ones with a non composite Key) doesn't clean up Key when they have been processed etc... etc ... Very Ill ... and has been so since Delphi 3 but I had not felt it because my tables didn't need multi-part keys. IF SOMONE KNOWS OF A SIMPLE CONTROL THAT DOES THE JOB, MENTION IT PLEASE. Of course not one of these things that load all rows in memory, for obvious reasons. Bruno |
Fri, May 4 2007 10:29 AM | Permanent Link |
Chris Erdal | Bruno Krayenbuhl <b.kray@_bluewin> wrote in
news:E833B77A-9AFC-43F6-B16C-6F8B4B1E20DE@news.elevatesoft.com: > If I deactivate the DBLookUpComboBox, the scroll is instantaneous. > It seems that, when changing the current record, it makes a 'locate' > to second table. > > IF SOMONE KNOWS OF A SIMPLE CONTROL THAT DOES THE JOB, MENTION IT > PLEASE. Of course not one of these things that load all rows in > memory, for obvious reasons. > If in the main table's BeforeScroll event you deactivate the DBLookUpComboBox and reset-then-set a timer that reactivates it after a few hundred milliseconds, then if you scroll several times it will stay deactivated all the time and refill its list only once you stop scrolling. -- Chris (XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 4 + EDB 1.02 build 1) |
Mon, May 7 2007 12:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Luis,
<< If I deactivate the DBLookUpComboBox, the scroll is instantaneous. It seems that, when changing the current record, it makes a 'locate' to second table. Is it possible to increase the speed? Maybe using a independent Query for lookup table? Any way to deactivate lookup locate? >> The best way to work around performance issues like this is to set the lookup field's LookupCache property to True. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 10 2007 9:42 AM | Permanent Link |
Bruno Krayenbuhl | Chris,
... If in the main table's BeforeScroll event you deactivate the DBLookUpComboBox and reset-then-set a timer that reactivates it after a few hundred milliseconds, then if you scroll several times it will stay deactivated all the time and refill its list only once you stop scrolling. ... What I meant is that Borland's code is flawed in this particular control. One might imagine fixing DBCtrls unit but if you do so, you wont be able to rebuild, for example, DBSys because there will be a Version mismatch from QRStandard that is delivered with Delphi and is used in DBSys. To further elaborate just examine the private variable FLookupMode that is declared once in TDBLookupControl and once in TDBLookupComboBox. I can tell you that in TDBLookupComboBox.KeyValueChanged it is always false so there will systematically a new LocateKey etc... Regards, Bruno with assssssssssssssssssssssss |
Thu, May 10 2007 9:47 AM | Permanent Link |
Bruno Krayenbuhl | Chris,
Sorry for the last line of my post, it was a typing error on my part. Regards, Bruno |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |