Bug #3789 myodbc 3.51.7 error in vb
Submitted: 16 May 2004 23:13 Modified: 9 Mar 2007 9:44
Reporter: jie zhang Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:MYODBC 3.51.7 OS:Windows (WINDOWS 2000)
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[16 May 2004 23:13] jie zhang
I'm a developer VB using myodbc,  I update MyODBC to 3.51.7, but it has two error.   

1. I can't get the real string when the string is binary.

2. This SQL "SELECT  CURRENT_DATE(), CURRENT_TIME();"  can't get the mysql server real time, is date too. The result is two date!

please check it.  Thanks.

How to repeat:

try it very easy.
[18 May 2004 21:10] joshua han
Perhaps the server time and date is incorrect?  I know it seems simple but it's always worthwhile to check out.
[31 May 2004 14:49] Philip
The problem is that in vb and msjet dates are represented as integers and time as fractions myODBC converts date-time to integer + fraction correctly but if you have time only field it is converted to integer based on some seconds interpretation

How to repeat:
The easiest way is using msaccess:
Create a pass-trough query1:
SELECT  CURRENT_DATE() cd, CURRENT_TIME() ct,now() as nt;

Make a query based on query1:
SELECT CDbl([cd]) AS Expr1, CDbl([ct]) AS Expr2, CDbl([nt]) AS Expr3
FROM Query1;

The second column is interpreted as a very large date…

How to workaround:
In vb:
Pen record set (R) based on :
SELECT  CURRENT_DATE() cd, CURRENT_TIME() ct,now() as nt;

SELECT CVDate([nt]-[cd]) AS t
FROM Query1; provided you still have that pass-trough query
[1 Sep 2004 0:33] MySQL Verification Team
Query showing wrong current_time

Attachment: wrong_current_time.JPG (image/jpeg, text), 27.10 KiB.

[1 Sep 2004 0:34] MySQL Verification Team
Verified with Access 2003. See attached picture.

Thank you for the bug report.
[9 Mar 2007 9:44] Bogdan Degtyariov
See the bug#25846.