LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect syntax near 'float' MS SQL 2012

Solved!
Go to solution

This code worked before when I only had a bundle of two doubles going into the insert-to-table, but when I added the strings to the bundle this error message leapt out at me. Not sure where "float" comes from...

 

floatsyntax.png

0 Kudos
Message 1 of 5
(4,654 Views)

Bonbonbaron,

 

There are several things wrong with you code but I shall address the issue you have queried. Have you opened the SQL database and added the new columns that you are trying to write to? Also please, to stop me from having a mental break down, move your open DB and close DB outside the loop.

Regards

Andy
_______________________________________

"To 'G' and not to 'C', this is not a question!"
0 Kudos
Message 2 of 5
(4,636 Views)

I understand where you're coming from, Andy, but I have to leave it in there for it to record everything to the database. It worked just fine before I added the string inputs. Since the test's duration is undetermined, it has to be stopped by a "STOP" button, so when I put the open/close functions are outside of the while loop, nothing got written to the database. And I haven't needed to add columns manually in the past, because labview automatically generated them in the table since it creates the table if it doesn't exist already, and otherwise adds to it.

0 Kudos
Message 3 of 5
(4,632 Views)
Solution
Accepted by topic author bonbonbaron

My guess would be the & in the field name Smiley Surprised. This is an SQL function that performs a bitwise AND on the specified values, in your case the values are text, not numeric.

 

 

Message 4 of 5
(4,627 Views)

So beautifully simple-- I also had to get rid of all the spaces with underscores. Thank you!!

0 Kudos
Message 5 of 5
(4,611 Views)