Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » SqlArray and data validation
Re: SqlArray and data validation [message #33358 is a reply to message #33343] Wed, 27 July 2011 17:37 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
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.

[Updated on: Wed, 27 July 2011 18:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: master/detail sqlite3 example
Next Topic: Timestamp accuracy in postgres and upp
Goto Forum:
  


Current Time: Mon Apr 29 11:42:22 CEST 2024

Total time taken to generate the page: 0.03102 seconds