Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 680
  • Last Modified:

DETAILS VIEW DATE/TIME STAMP IN ACCESS

I have a MS Access column named "MCOcompBy" which default setting set to:  Now().
When the attached details page is updated using the Update Function on details page name "Home3.aspx" I need it to log the date/time the update occured.   I have attached my details page and code behind.
Home3.aspx
Home3.aspx.cs
0
BOEING39
Asked:
BOEING39
  • 2
1 Solution
 
madginoCommented:
In AccessDataSource, modify Updatecommand to ' ...[Updated] = Now(), ...' and delete the 'Updated' parameter.
Other solution would be to use 'Updating' event of the AccessDataSource and set the parameter value there:
e.Command.Parameters["Updated"].Value = DateTime.Now
0
 
BOEING39Author Commented:
When you refere to [Updated]  are you refering to [MCOcompBy]  in my data base as referenced above?
0
 
madginoCommented:
Yes, you're right, it should be [MCOcompBy] instead of [Updated].
I saw that in the parameters list is defined as string so if you use it in .NET (2nd solution) you should assign it a string value: DateTime.Now.ToString or you'll have to change parameter type to datetime
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now