Click here to Skip to main content
15,889,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
1.in my database i have table in which a column name period have a default value '1st July to 31st December',but this value has to change after 6 month to another default value'1st jan. to 31st June'.
can i change this default value according to system date,if so how.

2.i have to show this default value on my form's label, how i implement this.

please help.

thank's
Posted

1 solution

A date column can have only one default value, so I don't understand what you mean by '1st July to 31st December'?

Having said that, dynamically changing default values are best handled in the application logic. It is not a good idea to execute DDL statements on the database every now and then to adjust to changing business requirements.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900