Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    3

    Unanswered: MyODBC time problem. Help pls!

    Hello ..
    recenlty I wanted to migrate my app from MySQL 3 to MySQL4.1.19, conector: MyODBC 3.51.06 into MyODBC 3.51.11-1win.

    Now I have a problem with time values from my database. In a field I have the value '00:00:01'. When I retrieve this value in my app (via MyODBC) i get a null value. I don't want that null value, I vant my '00:00:01'.

    Before the migration, I hadn't this problem ... everything worked fine. Is there a setting in MyODBC that I must check to solve this? If not, how can I solve this problem ... quick?

    Please help me quick because it's a critical application for an airport.
    Any help would be apreciated.

    Thank you very much.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by claxonn
    Please help me quick because it's a critical application for an airport.
    you mean planes are circling waiting to land until we can help you find a solution??!!!



    what is the datatype of the column in question?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2005
    Posts
    3
    Not exactly ... but the productivity of the operational departament is ZERO because the software just ... doesn't work! DAMN (.

    The type of the column is ... obvious ... "time". That's all.

    I've also tried to put back the MyODBC 3.51.06 but I recieved an error message after the instalation ... Something like: the setup routines could not be found. Please reinstall the driver.

    HELP! TKS!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    okay, there are a couple of possibilities

    1. you attempt insert a time of '00:00:01' but odbc intercepts it and stores a null instead
    2. you attempt insert a time of '00:00:01' but mysql stores it as null
    3. you manage to insert a time of '00:00:01' but mysql displays it as null
    4. you manage to insert a time of '00:00:01' but odbc intercepts it and displays it as null

    let's start eliminating some possibilities, and see what we end up with

    let's insert a value into your TIME column

    Code:
    insert into yourtable ( ... , yourtimecolumn , ... )
    values ( ... , time_format(from_unixtime(1109833201),'%H:%i:%s') , ... )
    what do you get for the value in the TIME column when you display this row?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Mar 2005
    Posts
    3
    So ... i'm in the 4th situation.
    Explenation:
    1. MySQL 3 + MyODBC 3.51.06 - retrieved '00:00:01'
    2. MySQL 3 + MyODBC 3.51.11 - retrieved 'null'
    3. MySQL 4.1.19 + MyODBC 3.51.06 - impossible connection
    4. MySQL 4.1.19 + MyODBC 3.51.11 - retrieved 'null'

    So ... i'm 99% sure it's a problem with MyODBC. My question was if anyone knows if a setting in MyODBC can do/undo such a mess.

    I'm waiting for an answer. Tks!

Posting Permissions

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