LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mysql syntax error.

Greetings,
This is my first attempt at DB programming with MySQL, and I'm getting a "syntax error".
I'm using the modules from the LV DB connectivity kit.
 
About me:
Labview 7.1
WinXPsp2
MySQL 4.1.15
ODBC 3.51.12
 
Possible reason(s):
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [MySQL][ODBC 3.51 Driver][mysqld-4.1.15-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'image,LVDT1 float,LVDT2 float,Thickness float)' at line 1.  in Conn Execute.vi->DB Tools Create Table.vi->DB Tools Create Table If Not Exist.vi->DB Tools Insert Data.vi->Karona-500884.vi
 
Other apps are able to communicate with the MySQL database, so I don't think it's an issue with the DB. Maybe ODBC configuration? I can connect fine, and I can list tables and whatnot, but the block of code pasted below fails.
 
Here is the code that creates the error:
 
 
Thanks for any input.
 
Ryan Wiersma
0 Kudos
Message 1 of 2
(2,779 Views)
I figured it out.
 
I was under the assumption that the INSERT command would create the table automatically (which it DOES do), but it wasn't creating it with the proper type definitions.
 
So, I included a table-create command, setup the proper defs, and now it's working. I get an error on every run except the first run (the table is already created, I can't create it again). So I put a clear-errors command right behind the create-table command. Now everything works well.
 
-Ryan
0 Kudos
Message 2 of 2
(2,767 Views)