Subject | Re: [firebird-support] Detecting default values |
---|---|
Author | Milan Babuskov |
Post date | 2011-11-04T15:40:25Z |
Tetram Corp wrote:
What is the datatype of column?
Here are some ideas: If you have a varchar column, you can solve it by
increasing the column size by 1 character and make sure default uses all
characters. For example, if your field is normally char(3), you can
increase it to char(4) and set 'XXXX' as default. Restrict the data
entry in application to only allow 3 characters.
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================
> I thought about this solution but hoped there was a better one becauseDo you have a complete control over database and application?
> of, you're right, in my case the field has a restricted range but i've
> an other similar case where there's no limit in value range
>
> too bad. I will use this trick for my first case, and think again about
> app design for the second one
What is the datatype of column?
Here are some ideas: If you have a varchar column, you can solve it by
increasing the column size by 1 character and make sure default uses all
characters. For example, if your field is normally char(3), you can
increase it to char(4) and set 'XXXX' as default. Restrict the data
entry in application to only allow 3 characters.
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================