Dotan Cohen wrote:
Thank you Drew. Actually, for this application I would like the user
to be able to select one of the enum choices with a dropdown field,
like the HTML select field. It is not so critical that HSQLdb prevent
the user from entering "wall" as that the form present the user with
the choices of 'Red', 'Blue', 'Green', 'Yellow', 'White', and 'Black'.
Can this be accomplished at the form level? I have tried to play with
the input field but do not see how it could be done.

Thanks!


Sure - you can do this with a ListBox control. This control will allow the user to ONLY select from a predefined list.

You can find information on the ListBox in the online help, if you have questions of course just ask.

Last thing - Databases are really all about rules, rules that describe the data. So even if you use a listbox it is still a good idea to go ahead and make that CONSTRAINT at the database engine level. Or create a Foreign Key constraint, which you can do all in the GUI as a different path to the same goal.

Drew

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to