Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
AV when reading editmask |
Tue, Oct 9 2007 11:40 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Anyone
Interesting problem, almost certainly caused by my code but here goes. On a form I have the following procedure TContactsForm.RefreshLinks(Qry: TDBISAMQuery); begin Qry.DisableControls; Qry.Close; if not Qry.Prepared then Qry.Prepare; Qry.ParamByName('ContactID').AsInteger := Contacts_ID.AsInteger; Qry.ExecSQL; Qry.EnableControls; end; This is creating a dataset CareerSummary for the current contact I also have a lookup component that is derived ultimately from TCustomMaskEdit procedure TluXRef.DataChange(Sender: TObject); begin if csDestroying in ComponentState then Exit; if FDataLink.Field <> nil then begin if FAlignment <> FDataLink.Field.Alignment then begin EditText := ''; //forces update FAlignment := FDataLink.Field.Alignment; end; EditMask := FDataLink.Field.EditMask; <<<<<<<<<<<<<<< blows up here .... .... .... end; If I edit the main table (Contacts) and post the change RefreshLinks is called and everything works. If, however, I cancel the change then things blow up. To complicate the matter if I comment out the disable/enablecontrols the stupid thing works wether I post or cancel (so at least I have a workround). I'd like to fix it properly. Anyone have an idea? Roy Lambert |
Wed, Oct 10 2007 8:38 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< If I edit the main table (Contacts) and post the change RefreshLinks is called and everything works. If, however, I cancel the change then things blow up. To complicate the matter if I comment out the disable/enablecontrols the stupid thing works wether I post or cancel (so at least I have a workround). >> Are you using any TDBMemo controls ? I believe there is an issue with that control whereby it doesn't respect the EnableControls/DisableControls methods. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Oct 10 2007 9:09 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
The sql in question doesn't generate any memo fields so I guess the answer is no Roy Lambert |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |