LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL, Labview 7.1, SQL Toolkit 3.0 unable to retrieve "timestamp". I get 12:00:00 AM instead.

I am attempting to retrieve a time as "HH:MM:SS" from a mySQL database via an ODBC connection using Labview 7.1 and SQL Toolkit v3.0 using the "Complete SQL session.vi" The sql statement is: SELECT * FROM table.

When I look at the query results in Labview the times are all displayed as 12:00:00 AM even if the data in the mySQL table contains 10:10:00 (note there is no AM/PM designation in the table) or some other time. Other numeric data as well as date data are displaying correctly. The SQL column is of type TIME. If I check the results in phpMyAdmin, the data for time displays correctly. I am able to use the "Complete SQL session.vi" to INSERT new values for time in my desired format and they show up in the database but I cannot retrieve them properly in a subsequent query using the SELECT statement.

I need the data in the "HH:MM:SS" as military time rather than as the official labview timestamp as I am later calling the database from another application.
0 Kudos
Message 1 of 4
(3,747 Views)
Hello Scott,
I notice you are using the SQL 3.0 toolkit with LabVIEW 7.1. I was wondering if you had tried replicating this issue with the newer Database Connectivity Toolkit (http://sine.ni.com/nips/cds/view/p/lang/en/nid/6429). The SQL 3.0 toolkit actually came out around the time LabVIEW 5 did. Quite a bit has changed in the last several revisions of LabVIEW and this may be a reason for the odd behavior you are experiencing.

Best Regards,
Chris J
0 Kudos
Message 2 of 4
(3,735 Views)
I purchased this toolkit with Labview 6i so for me it is "relatively" recent. - hesistant to buy an upgrade unless absolutely necessary - especially as I don't know if it will solve my problem. I have a separate request for more info on the new version from NI though.
0 Kudos
Message 3 of 4
(3,729 Views)
Hello Scott,
I can understand your concern. Unfortunately the older toolkit has not been extensively tested with the newest version of LabVIEW because the Database Connectivity Toolkit has replaced it. As such, I don’t have any information on why you may be experiencing this problem. Perhaps other customers have more experience using the SQL 3.0 Toolkit with LabVIEW 7.1 ...

Best Regards,
Chris J
0 Kudos
Message 4 of 4
(3,709 Views)