Bert,
if you have access to the table field definitions, you can set the default
value of the desired field to "getdate()", this retrieves the date/time on
the SQL server automatically, no need to specify manually...
hope this helps...
wardeaux
"Bert" <> wrote in message
news:B3465988-5B68-4F55-82BB-...
> I would like to store a Date/Time stamp in a SQL tabel.
> Now only the Date is stred and not the time. How to I get the time also?
>
> This is the code (There is more, but that works):
>
> atSQLexe ex=new atSQLexe();
> ex.addConnection=app.dbConnection;
> sql="INSERT INTO Log (UserID, Date) VALUES (@UserID, @Date)";
> ex.addParm("@UserID",userID);
> ex.addParm("@Date", DateTime.Today);
> try
> {
> ex.ExecuteSQL(sql);
> }
|