How to do: timestamp?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mika M (mika.mahonen_at_nospam_kolumbus.fi)
Date: 02/06/04


Date: Fri, 6 Feb 2004 16:09:39 +0200

Hello!

I have Windows forms application made by VB 2003, with some TextBoxes for
master table data, and DataGrid for child table data. These controls are
bound to dataset datatables using ADO.NET.

I save this data of the form controls into certain target path as certain
kind of text file. Just after text file is created, I need to put timestamp
into database table to use avoiding make this text file again later. I have
bound TextField on the form to show this timestamp, but how should I make
this timestamp? Data Type in the database table field is smalldatetime.

It would be better to use as Timestamp database servers time because
workstation computers time may not be correct, but maybe 'Now' or something
like that works fine too.

Using sql to do this would be something like this ...

update MyTable set FileCreated = GETDATE() where SomeID = This_ID

... but when controls are bound to datatable I propably shouldn't use this -
or should I ?

--
Thanks!
Mika


Relevant Pages

  • Re: Row cannot be located for updating error (ADO)
    ... Update TableName Set Field = NewValue Where Fierld = OldValue And ... ... (Timestamp or ID) ... >>directly to the database but the data aware controls are writing to the ... It is up to ADO to find the record in your database to update. ...
    (borland.public.delphi.database.ado)
  • Re: Tuesday 11th August 2009 (AEST) - 36 hours since Doggys threat
    ... Annika1980 wrote,on my timestamp of 18/08/2009 9:19 PM: ... degree to which he controls the discussion, just by staying out of it. ... Keeping Doug out of the discussions is a good thing. ...
    (rec.photo.equipment.35mm)
  • Re: The Zen nature of a Delphi database application
    ... results directly to UI controls, then write data from the controls to ... then write data back from the modified objects to the DB for storage? ... I load the whole contents of the database into my business objects, ... I have dreamt of the perfect OO database application framework ...
    (comp.lang.pascal.delphi.misc)
  • Re: Concurrency Help
    ... The timestamp column is changed whenever ANY data in the row is ... >> An UPDATE operation with a focused WHERE clause is an atomic operation. ... I want to know if a database, ... >>> 1 would overwrite client 2's changes to the db. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: multiple subform images per main search form record
    ... Document ScreenDumps of: ... get a marker and label all controls with the Name property so when you ... save your word doc in the directory with the database you are documenting ... Show Images from Continuous Subform ...
    (microsoft.public.access.formscoding)