Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with designing a form ..
Message
From
18/10/1999 12:09:49
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
15/10/1999 09:00:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00276531
Message ID:
00277722
Views:
23
Rosy,

A couple of things to try.

First, make sure you have the relation between the family's primary key and the child's foreign key established in the form's data dictionary. Do NOT make it a one-to-many, even though it would seem to make sense to do so.

This is the most likely reason why you are not getting child data saved. You can check this by looking at the child table from the command window and seeing if the records have been added. If they have been added, but the foreign key to the family table is blank, that could would explain why they seem not to be saved.

Hmmmm, it may be as well that you have assigned the foreign key to the parent table as a Primary Key. If it is getting added in as a blank (due to the relation not being there or not working), then it will trigger the reject of two blank values with a "Uniqueness of ... is violated error."

More details: Can you give the exact Uniqueness violation error message?



>Hello Kenneth!,
> Thanks for your advise and dedication ...
>Yes, you're close about what I want. I've made a form 1- N, and I'm using a Grid for the N side, but the problems I have is that I don't know how to handle inserting, deleting and updating the info in the grid.
>Can I be more specific? Sure I can!, right? ;) so I'll tell you exactly what I've done.
>
>1. I have a parent table called family (cod_family c(2), name_family c(40)) and the child table called children (cod_family c(2), cod_children c(2), name_children)
>2. When we attempt to save info in the grid we automatically save the cod_family and the cod_children fields, but we enter the name_children field
>3. We've determined that pressing CTRL+ENTER we will add a new row in the grid but this is not working, the name_children data isn't saved
>4. When we want to delete a row in the grid, we are allowed too, but if we try to add a new row we have the error "Uniqueness of ... is violated" or something like that.
>
>Hmmm I hope this time you'll understand well what I mean and please help! Maybe you've already noticed, but I'm not good yet programming in Visual. Thanks for your time and I'll be waiting your answer!
>
>Rosy
Previous
Reply
Map
View

Click here to load this message in the networking platform