Java Datetime Strategies with SqlServer

From: Ian Walsh (spondishy_at_tiscali.co.uk)
Date: 05/12/04

  • Next message: Amedee Van Gasse: "question about scrollable resultset"
    Date: 12 May 2004 06:24:29 -0700
    
    

    Hi,

    I'm new to Java (from a .Net background) and I'm having problems
    inserting a 'datetime' field into a SqlServer Database. I can insert a
    date (01/01/2004) and a time (eg 01/01/1970 15:23) but not a Datetime
    (eg 01/01/2004 15:23).

    Can I do this using Java.Sql? If not, what is the usual strategy for
    inserting datetime values into a SqlServer database.

    All help appreciated.

    Thanks.


  • Next message: Amedee Van Gasse: "question about scrollable resultset"

    Relevant Pages

    • Re: Java Datetime Strategies with SqlServer
      ... Ian Walsh wrote: ... > inserting a 'datetime' field into a SqlServer Database. ...
      (comp.lang.java.databases)
    • Re: Java Datetime Strategies with SqlServer
      ... Ian Walsh schrieb: ... > inserting a 'datetime' field into a SqlServer Database. ...
      (comp.lang.java.databases)
    • Re: timestamps as part of a primary or foreign key.
      ... no two threads will every be inserting at the same time, ... and note that the DATETIME value is accurate only ... guarantee that your insert rate was serialized to ... two/second. ...
      (comp.databases.sybase)
    • Re: Problem with Insert and Datetime
      ... The colums defined as datetime. ... Dim cmd As New SqlCeCommand ... > I can think of is that you are either really inserting Jan 1, ...
      (microsoft.public.sqlserver.ce)
    • Storing appostrophes in SQL
      ... I want to save it to a SQLServer database ... If the user types in <Here's Johnny!>, ... it into SQLServer by inserting the text string <Here''s ... process the text string before I insert it to double all ...
      (microsoft.public.excel.programming)