pellus
5th April 2007, 09:56
LN6.1 on ms-sql.
Hello all.
I communicate with another system by reading and wrting in customised baan tables. The other system uses odbc and the real tables definition in ms-sql.
Of course, the other system manages to insert a record with some funny values which causes problems for me because they are out of range according to the domain definition. (E.g. discount percent = 3354.23 . The domain says that the value can be maximum 100.00).
So when I update the record with something it crashes due to this constraint.
We have now agreed that the other system validates values before inserting, with logic from a list I have given them. But this 'solution' to the problem is not perfect. I assume that more fields will be added to this communication interface, when me and the other guy are not around, documentation only may (will) not work . So what I want to do is to validate on the Baan side, this can be done in many ways but the preferred option is:
Using the actual domain definitions, i.e. the constraints in the domain, e.g. range, is what I validate the value against.
I don't find anything in the manual (or in this forum) that gives my an idea on how to validate to domains in this way, i.e. finding out if the value in a field is allowed.
Do you have an idea on how to do this?
Important is that it must not crash, it must be a controlled validation where I give an error message and the process continues.
Hello all.
I communicate with another system by reading and wrting in customised baan tables. The other system uses odbc and the real tables definition in ms-sql.
Of course, the other system manages to insert a record with some funny values which causes problems for me because they are out of range according to the domain definition. (E.g. discount percent = 3354.23 . The domain says that the value can be maximum 100.00).
So when I update the record with something it crashes due to this constraint.
We have now agreed that the other system validates values before inserting, with logic from a list I have given them. But this 'solution' to the problem is not perfect. I assume that more fields will be added to this communication interface, when me and the other guy are not around, documentation only may (will) not work . So what I want to do is to validate on the Baan side, this can be done in many ways but the preferred option is:
Using the actual domain definitions, i.e. the constraints in the domain, e.g. range, is what I validate the value against.
I don't find anything in the manual (or in this forum) that gives my an idea on how to validate to domains in this way, i.e. finding out if the value in a field is allowed.
Do you have an idea on how to do this?
Important is that it must not crash, it must be a controlled validation where I give an error message and the process continues.