Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple records update validation question
Message
From
16/05/2007 12:24:33
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01226060
Message ID:
01226068
Views:
24
>>>Hi everybody,
>>>
>>>This would be a basic question, but I want to get some ideas here.
>>>
>>>I have a form with a grid and some regular controls (combos and editbox) above the grid for editting. I can navigate through the records and edit multiple records. I also can add new records, though in my design I have to save parent first, if I also want to add children.
>>>
>>>Anyway, how should I check for validity of the data (new and updated) in such case?
>>>
>>>I found several records saved without description and though I do have ValidateInfo method in the form, it validates the current record only.
>>>
>>>So, I guess, I may have to use LostFocus event of a container and put fields for editting in the extra container?
>>>
>>>What other alternatives do I have here?
>>>
>>>Thanks in advance.
>>
>>Do you have a button 'Save new record' or something when user entered fields? It would be the most logical place.
>
>I have Save button on the toolbar, but the user may press it later. In other words, I just removed the info from one record, moved to another, then did other changes and then I can press Save. I can also add few new records and don't add info into one of them.
>
>I'm already getting INDEX doesn't support NULL error from CA Init, so I guess it's due to bad data I already have.

I meant that you could have a button accepting new or edited record. Most likely, it comes down to the binding again. 'Details' container fields should be 'bound' to custom 'detail' object properties, not to view/CA/cursor fields. This way user never enters to the grid, your code does it and it may include all needed validations.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform