If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MyODBC time problem. Help pls!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-05, 04:56
claxonn claxonn is offline
Registered User
 
Join Date: Mar 2005
Posts: 3
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.
Reply With Quote
  #2 (permalink)  
Old 03-03-05, 06:38
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-03-05, 06:46
claxonn claxonn is offline
Registered User
 
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!
Reply With Quote
  #4 (permalink)  
Old 03-03-05, 07:24
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 03-03-05, 07:36
claxonn claxonn is offline
Registered User
 
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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On