date and time functions not working
am 04.03.2011 21:10:36 von 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
Re: date and time functions not working
am 07.03.2011 18:17:47 von 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