Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
V3 Strange Delete problem |
Sat, Dec 30 2006 2:14 AM | Permanent Link |
Michael Fullerton | DBISAM V3
I am having a very strange problem. I have two tables A and B. B contains a field that "links" to the key of A. I have implemented code in ABeforeDelete to delete records containing the deleted field. That code will open B if is not open already. Now when I try to delete a record in a grid or data form using DBNavigator and B is not open the selected record is not deleted, usually the bottom record is instead. If B has been opened already before deleting the record in A the correct record is deleted from A. Any ideas as to what might be causing this behavior? ___ Free Project Time Tracker for Delphi Developers http://www.cybermatrix.com/pcdelphi.html |
Sun, Dec 31 2006 9:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Michael
My guess is its the way you do the "linking". If you have a master-detail set up then the pointer can't be moved in the detail table until its open (mind you Delphi should throw a wobbly if you don't have it open). What happens if you open the detail table and then refresh the master? Roy Lambert |
Tue, Jan 2 2007 1:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I am having a very strange problem. I have two tables A and B. B contains a field that "links" to the key of A. I have implemented code in ABeforeDelete to delete records containing the deleted field. That code will open B if is not open already. Now when I try to delete a record in a grid or data form using DBNavigator and B is not open the selected record is not deleted, usually the bottom record is instead. If B has been opened already before deleting the record in A the correct record is deleted from A. Any ideas as to what might be causing this behavior? >> It's not a good idea to open any table involved in a master-detail linkage. The reason is that opening will cause record pointer movements in one or both directions of the linkage, thus possibly destroying any current record position. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jan 2 2007 2:19 PM | Permanent Link |
Michael Fullerton | On Sun, 31 Dec 2006 14:11:25 +0000, Roy Lambert
<roy.lambert@skynet.co.uk> wrote: >Michael > > >My guess is its the way you do the "linking". If you have a master-detail set up then the pointer can't be moved in the detail table until its open (mind you Delphi should throw a wobbly if you don't have it open). What happens if you open the detail table and then refresh the master? I'm not using Master-detail. I mean linked as in the tables are JOINable. I think I resolved the problem. The Table B dataentry form did not have another JOINed table opened (for a DBLookup list). Once I made sure the table was opened, deletions seem to act normally. Very creepy. ___ Free Project Time Tracker for Delphi Developers http://www.cybermatrix.com/pcdelphi.html |
Tue, Jan 2 2007 3:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I'm not using Master-detail. I mean linked as in the tables are JOINable. I think I resolved the problem. The Table B dataentry form did not have another JOINed table opened (for a DBLookup list). Once I made sure the table was opened, deletions seem to act normally. Very creepy. >> If you want to post the code that you're using, I can tell you exactly what is going on. As it stands, I'm kind of just guessing as to what you're doing. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |