LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MySql

Solved!
Go to solution

Hi all

I created VI with MySql in LV 85.

Now I work in LV86.

In LV 85 I created the table with Date/Time.

All was working.

When I run this VI in LV 86 the tables was created without Time, only Date (column Type).

MySql_ERROR.GIF

MySol_Err.GIF

 

 

The table "2 " was created LV85 and  table "1 " was created LV86.

Why is without Time?

Best regards

Iskander 

 

 

 

 

0 Kudos
Message 1 of 6
(3,874 Views)
Not sure but you could use the SQL execute VI and then run a CREATE TABLE command.  Do this in 8.5 and 8.6 to see if you end up with different results.
0 Kudos
Message 2 of 6
(3,835 Views)

I have reproduced the same error with LV 2009 and MySQL 5.1.  It appears that DB Tools Create Table.VI is sending 'date' as the data type to MySQL, as you see from your 'DESCRIBE' statement.

 

What version of the Database Connectivity toolset are you using / did it change?

Are you using the same version of ODBC driver as before?

Did the version of MySQL change as well?

 

It appears to be a bug in the Database Connectivity toolset, but there's some chance that it's the ODBC driver. The version of MySQL shouldn't matter as DATE and DATETIME have been supported as distinct data types as far back as 3.23.

 

The toolset manual, page 4-2 seems to indicate that the toolset will map Date/Time to DATE.  Don't know if this has changed in the latest version of the toolkit, but even in DB Tools List Columns, it converts MySQL from DATE to Date/Time.

 

DB Tools Execute Query.VI seems to work fine though:

LV1.png

 mysql.png

 

It's an easy enough work-around, but the bug is unfortunate.  Perhaps it's time for the DB toolkit to be revamped to fix this and its performance issues?


Matt

 

Update - checked with '0' and other values for size of Date/Time and it didn't make a difference.

Message Edited by MattWhitlock on 10-15-2009 10:44 PM
Message 3 of 6
(3,809 Views)
Solution
Accepted by Iskander

Hi all.

Thanks for the help.

I did so.

All is working.

Best regards

Iskander.

 

 

0 Kudos
Message 4 of 6
(3,770 Views)
It will help the forum if you could mark the post that helped you solve the problem instead of marking yours
0 Kudos
Message 5 of 6
(3,756 Views)

I used DB Tools Execute Query VI to create tables how write MattWhitlock.

0 Kudos
Message 6 of 6
(3,734 Views)