Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clistobjedit - Add record, add 2nd record, cancel...kabo
Message
From
24/05/2004 19:29:41
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
 
 
To
24/05/2004 18:32:51
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00904742
Message ID:
00906751
Views:
26
Jason,

I looked a little closer per your suggestion. I use a local view, call it locview. The table it pulls from is, let's say sometable. Here's what I see in the debugger when I trap just after the form is init'd:

Recno('locview') = 1
Reccount('locview') = 0
clistobjedit.grdlist.nrecno = 1
EOF('locview') = TRUE
BOF('locview') = FALSE

Although, both the view and the table, sometable, BOTH have zero records in them! This is very confusing to me, because now the grdlist.nrecno property seems to be one higher than what is actually in the view/table? I'm not sure what to do here. Could it be that I have three (3) clistobj objects on one form?

Thanks!

>Scott,
>
>That code looks fine. The framework only stores nRecNo when the add is successful. From what you're describing, I'm wondering if it's possible that the first record isn't really saved. Then, when you cancel the second addition attempt, the framework tries to access the first, and you get that error.
>
>Remember, too, issuing BROWSE on a row-buffered view will commit its changes, which may explain why you aren't seeing this when debugging. Always check field values in the debugger instead.
>
>I would check to be sure that the first record is really saved, and what the resulting nRecNo value is -- both for the first record, as well as subsequent attempts.
>
>Hope that helps,
>---J
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform