Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use the server date?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00819947
Message ID:
00820274
Vues:
29
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform