NetTalk Central

Author Topic: Swith off Automatic Dictionary Validation  (Read 2664 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Swith off Automatic Dictionary Validation
« on: September 06, 2011, 06:05:10 AM »
Hi,

On some fields the validation options of the dictionary are applied - seemingly without an option to disable them to add my own handling of the selection. Even with "Immediate Validation" on the field set to No it still generates the code. Is the only way now to take of the validation in the dictionary against the column?

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Swith off Automatic Dictionary Validation
« Reply #1 on: September 07, 2011, 09:25:42 PM »
The code will always be generated - but if you look you can embed code before it to "ignore" it.
Look for the ValidateValue::FieldName routine.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1848
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Swith off Automatic Dictionary Validation
« Reply #2 on: March 23, 2012, 04:49:09 AM »
Hi Bruce,
I´m avoiding Automatic Dictionary Validation ignoring it by OMITing but I´m still getting errors from the exe.
The errors pops when the exe validates the dct fields which has, by Ex, "must be in list" restrictions.
The app has the "Suppress Error Messages" check but this messages are still there.
How can I solve it?
Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Swith off Automatic Dictionary Validation
« Reply #3 on: March 23, 2012, 05:33:08 AM »
Hi Alberto,

>> I´m avoiding Automatic Dictionary Validation ignoring it by OMITing

An EXIT just before the generated test would be better than an OMIT. but that won't change your problem.

>> but I´m still getting errors from the exe. The errors pops when the exe validates the dct fields which has, "must be in list" restrictions.

Of course. The ABC engine is also applying the validation rules - since you are trying to write invalid records into the database you must assume that ABC will complain as well. If you use SQL, and you set constraints there, you'll get exactly the same effect.

At the root of the problem is the fact that you are trying to have dictionary validation, which by definition _requires_ that the conditions be met - but at the same time, conveniently choose to ignore the validation when it suits you. You can't really have it both ways - you either have rules, or you don't. If you have rules, then leve them in the dict, and let NetTalk enforce them for you. If you don't have rules, then remove them from the dictionary.

>> The app has the "Suppress Error Messages" check but this messages are still there.

Only messages generated by the nettalk classes are suppressed. If you want to suppress Message boxes in your program in general then you need Capesoft MessageBox.
However note that this will not bypass the validation - the write of the record to disk will still fail, it's just that the message will be suppressed.

>> How can I solve it?

sounds to me like you should be removing the dict validation, or priming these fields to valid values.

cheers
Bruce