Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

WwWXxX, udp high ports, d-link extract firmware dsl-2750u, wwwwxxxxx.2G, yxxxcom, WWWXXX, ftp://192.168.100.100, wwwxxx 100, www.xxxcon, wwwxxx

Links

XODOX
Impressum

#1: date and time functions not working

Posted on 2011-03-04 21:10:36 by Chris Purves

Hello,

Date and time functions are not working for me when using the ODBC connector with LabVIEW. The following query works fine on the command line client on the server:

SELECT measurement_id, measurement_time, year(measurement_time) FROM measurements WHERE measurement_id = 84;

with the following result:

+----------------+---------------------+-------------------- ----+
| measurement_id | measurement_time | year(measurement_time) |
+----------------+---------------------+-------------------- ----+
| 84 | 2010-01-08 15:35:25 | 2010 |
+----------------+---------------------+-------------------- ----+
1 row in set (0.00 sec)

When going through the MySQL ODBC connector I get no value returned for the YEAR function:

Value -> 84.000E+0
Value -> 08/01/2010 3:35:25 PM

Other seemingly simple queries don't work either: "SELECT 3" for example.

--
Chris Purves

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Report this message

#2: Re: date and time functions not working

Posted on 2011-03-07 18:17:47 by Chris Purves

On 2011-03-04 15:10, Chris Purves wrote:
> Hello,
>
> Date and time functions are not working for me when using the ODBC connector with LabVIEW. The following query works fine on the command line client on the server:
>
> SELECT measurement_id, measurement_time, year(measurement_time) FROM measurements WHERE measurement_id = 84;
>
> with the following result:
>
> +----------------+---------------------+-------------------- ----+
> | measurement_id | measurement_time | year(measurement_time) |
> +----------------+---------------------+-------------------- ----+
> | 84 | 2010-01-08 15:35:25 | 2010 |
> +----------------+---------------------+-------------------- ----+
> 1 row in set (0.00 sec)
>
> When going through the MySQL ODBC connector I get no value returned for the YEAR function:
>
> Value -> 84.000E+0
> Value -> 08/01/2010 3:35:25 PM
>
> Other seemingly simple queries don't work either: "SELECT 3" for example.
>

I was able to solve the problem by enabling the option "Treat BIGINT columns as INT columns". I don't know if this was a problem with the ODBC connector or with the LabVIEW SQL functions, but it's working now.

--
Chris Purves

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Report this message