RE: Problem storing date and time in one column

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

From: David J (DavidJ_at_discussions.microsoft.com)
Date: 07/28/04


Date: Wed, 28 Jul 2004 02:02:06 -0700

Hi Jason,
I am currently using my app against access but I have the same problem using sql-server. It is only the date that is stored. This is the insert parameter I am using:
OleDSIns2.Parameters.Add(New OleDb.OleDbParameter("CREATED_STAMP", OleDb.OleDbType.DBDate, 0, "CREATED_STAMP"))

I tried to change the oledbtype to dbtime, date, dbtimestamp as well but that all didn't work

Thanks
"JMW" wrote:

> My first question would be to actually see the value stuff into the database. SQL Server will only show the date when queried but the entire date and time are actually stored.
>
> jason.
>
> "David J" wrote:
>
> > Hi,
> > I am trying to store a datetime value in a column of a table. I am using the code generated by the dataform wizard. However when I insert a new line with a new created date and time I only get the date stored and not the time. The setting of the field in the dataset is datetime. I am using Now to get the correct time. The insert command parameter is of the type oledbdate. I have also tried with oledbTime and oledbTimestamp but I do not succeed.
> >
> > Can anyone give me a suggestion?
> >
> > Thanks
> >
> > David J



Relevant Pages

  • Performance: SQL-Server mit ASP-NET oder WinForms
    ... Geplant war das als ASP-NET App. ... dem SQL-Server, das Transportieren der selektierten Daten vom WebServer zum ... Prev by Date: ... Next by Date: ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Lookup Problems
    ... i use D5 with ADO on SQL-Server 2000. ... In my app i usw some cascade detail ...
    (borland.public.delphi.database.ado)
  • Re: MSDE 2000 und SBS 2003, langsamer Betrieb
    ... Die Antivirensoftware auf dem Server habe ich so konfiguriert, ... Wochenende getestet und unsere App lief problemlos. ... Ich hab dann den SQL-Server bzw. unsere Instanz über den Dienstemanager neu ...
    (microsoft.public.de.sqlserver)