Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use the server date?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00819947
Message ID:
00820274
Views:
30
>>Have you tried using a Default on the column in SQL Server?
>
>I am using default = getdate() for the column but that only work at INSERT but not UPDATE.

You can use
--drop table test
--create table test (id int identity, date Datetime default getdate())
--insert test values (default)
update test set date=default where id=1
select * from test
if you are passing the sql statement to the back end. I don't know how to make ADO.NET generate this command. Does anybody know?

Triggers, as Bonnie mentioned, are probably a better solution, although they create their own problems.
Previous
Reply
Map
View

Click here to load this message in the networking platform