Results 1 to 2 of 2
  1. #1
    hacktorious is offline Member
    Join Date
    Dec 2010
    Posts
    8
    Rep Power
    0

    Default issue with update on table and prepared statement

    I am having an issue updating a table using a preparedstatement in MySQL 5.5.

    I have the following table
    INTEGER sessionId
    TIMESTAMP startDate
    TIMESTAMP endDate
    VARCHAR notes

    Here is the query I send to to the prepared statement (executeUpdate(query)):
    UPDATE session SET notes = ? WHERE session_id = ?

    When I execute the code, the notes field is updated. However, the dates in both date fields are also being changed to todays date for some reason.

    Does anyone know what could possibly cause this? Thanks.

  2. #2
    hacktorious is offline Member
    Join Date
    Dec 2010
    Posts
    8
    Rep Power
    0

Similar Threads

  1. Jdbc Prepared Statement execute()
    By nitishjtm in forum JDBC
    Replies: 37
    Last Post: 12-16-2010, 08:43 AM
  2. JDBC Prepared Statement
    By Floetic in forum JDBC
    Replies: 4
    Last Post: 05-20-2009, 11:53 PM
  3. Prblem in Prepared Statement
    By haneeshrawther in forum JDBC
    Replies: 2
    Last Post: 04-25-2008, 09:49 AM
  4. Using Prepared Statement
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-06-2008, 09:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •