ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database Querry error when using # in column name

I am using the Database toolkit to work with a MySQL database.  Some of the columns in the database have names with special characters: Batch# and Employee#.  The database tools give me an error when I try to write data to those fields.  I have tried square brackets around the column name [Batch#] but that doesn't seem to help.  Is there a way to update these fields with the Database tools?

Here is the errror:
Error -2147217900 occurred at Cmd Execute.vi->DB Tools Insert Data.vi->Move to NCP.vi

Possible reason(s):
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [MySQL][ODBC 3.51 Driver][mysqld-3.23.49-log]You have an error in your SQL syntax near '' at line 1.  in Rec Create - Command.vi->Cmd Execute.vi->DB Tools Insert Data.vi->Move to NCP.vi
0 Kudos
Message 1 of 1
(2,487 Views)