Board index » delphi » Very strange behaviour of BDE
bba
![]() Delphi Developer |
Sat, 05 Mar 2005 13:09:59 GMT
|
bba
![]() Delphi Developer |
Sat, 05 Mar 2005 13:09:59 GMT
Very strange behaviour of BDE
Hello!
Who can explain such situation? We have 3 line of program: // agreeInd = tblAgree->FieldByName("Agree_key")->AsInteger; tblAgree->Edit(); agreeInd = tblAgree->FieldByName("Agree_key")->AsInteger; // After executing the first line agreeInd == 3782; And after executing the third line agreeInd == 2054. It is very strangely is not it? Bernard A. Beizman |
Bill Tod
![]() Delphi Developer |
Sat, 05 Mar 2005 21:36:47 GMT
Re:Very strange behaviour of BDEWhat database are you using??? On Tue, 17 Sep 2002 09:09:59 +0400, "bba" <b...@gpb-sar.renet.ru> Quote> Hello! Bill (TeamB) (TeamB cannot respond to questions received via email) |
Bill Tod
![]() Delphi Developer |
Mon, 07 Mar 2005 00:38:17 GMT
Re:Very strange behaviour of BDETry rebuilding the table with the table repair program at www.rksolution.cz . The table or the primary index may be corrupt. On Wed, 18 Sep 2002 08:30:50 +0400, "bba" <b...@gpb-sar.renet.ru> Quote>Hello! Bill (TeamB) (TeamB cannot respond to questions received via email) |
bba
![]() Delphi Developer |
Mon, 07 Mar 2005 14:36:53 GMT
Re:Very strange behaviour of BDEYes, I've tested all tables in directory. There were not errors. Have you any other ideas? Bernard A. Beizman Bill Todd <b...@notthis.dbginc.com> ??? a Quote> Try rebuilding the table with the table repair program at |
Bill Tod
![]() Delphi Developer |
Mon, 07 Mar 2005 21:59:21 GMT
Re:Very strange behaviour of BDECreate a new application. Add a button and copy the three lines of code from your original message to the OnClick event handler of the button. Add a TDatabase and TTable and connect them to the table? Do you still get the same behavior? -- |
bba
![]() Delphi Developer |
Mon, 07 Mar 2005 23:00:22 GMT
Re:Very strange behaviour of BDECertainly not! I even have right behaviourof program if I insert following lines before above three: TBookmark bm, bmAgree; Quote} tblAgree->FreeBookmark(bmAgree); DataMod1->tblOpers->GotoBookmark(bm); DataMod1->tblOpers->FreeBookmark(bm); By the way tblOpers has tblAgree as MasterSource and ModifyRemainders Bill Todd <b...@notthis.dbginc.com> ??? a Quote> Create a new application. Add a button and copy the three lines of |
Bill Tod
![]() Delphi Developer |
Tue, 08 Mar 2005 00:31:24 GMT
Re:Very strange behaviour of BDEOn Thu, 19 Sep 2002 19:00:22 +0400, "bba" <b...@gpb-sar.renet.ru> Quote>Certainly not! way to find the cause is to trace through your code one line at a time in the de{*word*81}. -- |
bba
![]() Delphi Developer |
Tue, 08 Mar 2005 19:04:16 GMT
Re:Very strange behaviour of BDEI have not BeforeEdit and AfterEdit Events for table tblAgree. I can not find "with Debug dcu's" option on the compiler option page. Perhaps you meant "Use Debug Libraries" on Linker Page? I've chosen this option, but when I try to watch return value of tblAgree->FieldByName("Agree_key")->AsInteger, I got the message "Can not evaluate the function call". So it does not help. Sincerely, Bernard A. Beizman Dipsy <Di...@Teletubbie.land> D??? Quote> Just a guess. Do you have a BeforeEdit-Event or AfterEdit-Event Quote> after every step. Quote> > Certainly I inspected my program and those 3 lines in de{*word*81}. The |
Bill Tod
![]() Delphi Developer |
Tue, 08 Mar 2005 21:51:04 GMT
Re:Very strange behaviour of BDEWhat code is in the BeforeEdit and AfterEdit event handlers of the TTable? What code is in the OnStateChange event handler of the TDataSource? -- |
Bill Tod
![]() Delphi Developer |
Tue, 08 Mar 2005 21:53:34 GMT
Re:Very strange behaviour of BDEAlso, when you step through the three lines of code in the de{*word*81} make sure you use F7 (trace into) and not F8 (step over) so you will trace through any event handlers that fire. -- |
Matt Jacob
![]() Delphi Developer |
Thu, 10 Mar 2005 03:56:54 GMT
Re:Very strange behaviour of BDEAre you performing your edit/post within a loop? Something like. while (!tblAgree->Eof) Quote} -- My reply-to address is purposely mangled to thwart auto-reply bots. |