Do you use the formating also when displaying the values in the UI?

If not, is it possible to defer the formating right before writing the
*value* to the db?
At that point it is known (is it?) to which db field you are going to write to.

Currently it seems you are coupling the format information to a variable.
But it think it should be coupled to a db field (constructure).

Somewhere you store/define the db field info.

Table.Field.Type.Length

Then right before the actual insert/update into db should occur,
format the incoming values according to db field information.
This should/can be handled in one place and not al over your app(s).

HTH
// Ryan

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to