Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty row?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00188655
Message ID:
00189690
Vues:
12
>I've got a form that is based on the bizobjmaintenanceform. On the first page, I've got my own business object (instead of using the default object). On the third page I have a different business object which is set as a child object. If I click on the "New" button, it adds a record (like it should) in the primary bizobj table. I can fill all the information in, then click on the third page I get a:
>
>"Cannot insert an empty row from a view into it's base table"
>
>error. I can reproduce the error if I browse the view associated with either of the bizobj's primary views, add a record then try to close it. I'm guessing it's because my primary index (iiD) field isn't preloaded with the new key, but I'm not sure why it's not getting set in my application. Any suggestions?
>
>Thanks,


OK, I've walked to the code with the debugger and it looks like MM preloads the index file like it should. After setting it, it changes the view status back to "empty" in the OnNew() method. This seems to be where I'm having problems (at least when I've got child objects on the other pages - I don't get the error if I don't have any child objects).

Here's what I'm seeing:

I click on the New() button to create a new record. Page two of the pageframe is activated to let me make my changes. Page two has a child object on it and has controls w/the controlsource bound to the primary business object's "InitialSelectedAlias" view.recordname . I fill some information in, then click to the next page tab. I get the error. If I change the child object to not autorequery (ie set it to 0), then in the Activate() method of the second page add manually requery the child objects primary view, it seems to work the first time. If I then go back to the first page, select a different record and go back to the second page, I get the error.

When I commented out the OnNew() code: =SETFLDSTATE(lcPrimaryKey, 3), the problem went away. No more errors. Of course, I can't leave it like this since it will cause problems of it's own. Is there something else I should be doing with my child objects to bypass this problem?

-Paul
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform