Hi Ted, Since every DB engine has it's own way of expressing discontent with constraint violations, some of which include the name of the constraint, and/or possibly the type (UNIQUE, CHECK, etc) and/or nothing it has been left as an exercise for the developer to parse the exception text returned by the database and then do something about it.
I've started naming all my constraints explicitly instead of letting FrontBase name them something completely meaningless. I can therefor use a REGEX to parse the error (because FrontBase will tell you the name of the constraint violated, but not the type) For example: NOT NULL constraints get named "NN.TABLE_NAME.COLUMN_NAME" and UNIQUE constrats are: "UNQ.TABLE_NAME.COLUMN_NAME.ANOTHER_COLUMN_NAME" If you just create a column and specify it as not null in the column definition you get a constraint name like _C123 which is somewhat less than useful… Dave On Aug 17, 2013, at 11:04 AM, Theodore Petrosky <tedp...@yahoo.com> wrote: > > UniqueConstraintException is defined in ERXSQLHelper as a response in method > "handleDatabaseException". > > what about the rest of the exceptions? if I insert a alpha keystroke into a > currencyAmount prototype, how can I adjust the message similar to: > > "UniqueConstraintException.loginname_idx" = "Please choose a different > username."; > > in the ValidationTemplate.strings > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com > > This email sent to webobje...@avendasora.com ————————————————————————————— WebObjects - so easy that even Dave Avendasora can do it!™ ————————————————————————————— David Avendasora Senior Software Abuser Nekesto, Inc.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com