Home » U++ Library support » U++ SQL » SqlArray and data validation
Re: SqlArray and data validation [message #33360 is a reply to message #33358] |
Wed, 27 July 2011 19:51 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Sender Ghost wrote on Wed, 27 July 2011 17:37 | Hello, Luigi.
forlano wrote on Tue, 26 July 2011 20:51 |
How is the recommended way to validate the data the user enters BEFORE they are gone in the database
|
I suggest to use Accept function to check if valid values used for Ctrls (more about this here, on 18 section).
To set valid values SetFilter or SetConvert (with creation of specialised Convert class) functions may be used.
Also, NotNull property of Ctrl can be used to prevent empty values. TrimLeft, TrimRight or TrimBoth EditString Ctrl functions to trim spaces from left, right or both sides, respectively.
In the case of ArrayCtrl/SqlArray you could try to use WhenAcceptRow, WhenAcceptEdit notification callbacks in conjunction with IsEdit, IsInsert ArrayCtrl functions.
|
Hello,
thanks for the suggestions. I'll try them.
Luigi
|
|
|
Goto Forum:
Current Time: Mon Apr 29 18:38:01 CEST 2024
Total time taken to generate the page: 0.02264 seconds
|