Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Buffering Problem: HELP!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00037882
Message ID:
00037907
Vues:
36
>>>John,
>>>
>>>Your statement "when I pack. . ." implies strongly to me that you *ARE* deleting records somewhere, somehow.
>>>
>>>good luck
>>>Jim N
>>>
>>>>This data buffering thing is killing me. There must be something is don't fundamentally understand.
>>>>
>>>>I have a form that has a grid that holds 'child' records. I have a button to 'Add' new child record and that isn't the problem. The problem is the child record I just added appears in the grid as long as I have the form open, even when I move the parent record around but when I close the form and reopen the form, the record(s) disappear!!!
>>>>
>>>>I have tried to change the buffer mode on the form from 2 (optimistic) to 0 (none) but the newly added record still doesn't get saved!!!
>>>>
>>>>If I exit my program and look at the records in the table from project manager, it displays in the status bar that total number of records have increased yet I'm not able to see the records when I open it in browse window. When I pack the table, the total number of records return to previous number before I added any records.
>>>>
>>>>Can anyone tell me what I'm doing wrong? I haven't had this happen to me since I started using VFP but this is driving me crazy!
>>If that was the case, if I set deleted off before I pack the table, shouldn't I be able to see it in the browse window from PM?
>
>John, I have 3 suggestions
>
>1 Look at the data in each record to be absolutely sure that you have the correct ID fields linking parent and child. Use DEBUG to check this before and after you move to a different parent record.
>
>2 Issue a specific TableUpdate() for the Child table after entering/editing each record.
>
>3 If you're working with updatable views, check ALL your update parameters. It's easy to miss one, and you get no warnings, the master tables just don't update.
Barbara,
Here is update to my problem and response to your 3 sugg.
1. I set the parent-child link through grid properties and never change it. In this case, it happens to be policy_id (Primary key in parent) and same policy_id (Foreign key for child).
2. I have also tried this when using buffering. However, it didn't work. Also tried buffer mode 0 which doesn't need TableUpdate() to be issued without success.
3. I'm not using any views, just table alias.

Update: I copied the project to my home computer and found out one important thing. In my home computer it's little different. When I add, let's say, two child records and exit form/app and go to PM and browse the child table, I now see two recs I added. Now when I rerun the app, I only see one record (the second record) only. Exit to PM and browse I now see that first record was deleted! I have no idea why! If I run the app again, the second rec will also be deleted. It seems everytime I run the app, one record is deleted each time. I can't understand it. I'm relatively sure I'm not issuing any delete statements within any other methods on the form. I got to finish this project by noon tomorrow and this is holding me back. It seems so simple and I have successessfully done similar forms w/o any problem whatsoever. I'm totally frustated!!!
It's "my" world. You're just living in it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform