by swingman » Wed Jul 05, 2006 8:19 pm
Ciao Gianni,
if I understand you right, you want to add a constraint, such as a foreign key constraint, on the SQL database from Servoy. There is no way of doing this in version 2.2, but you can add a constraint directly in your SQL database using some SQL tool.
The only problem is that when the user attempts to violate the constraint, you have no way of trapping the error message from the database in Servoy -- it just displays in a dialog window. Two ways around this,
1) you manually check that the contraint will not be violated in your Servoy methods (I know, extra coding :-( )
2) you write a trigger which raises a better error message when the user attempts to violate constraint. (This works with PostgreSQL at least, haven't tested other databases)