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: 

unknown sql error

Solved!
Go to solution

I'm trying to pull a specific instance from a table and i'm receiving an error with no description. Any Ideas?error.JPG

0 Kudos
Message 1 of 9
(3,744 Views)

Turn on highlight execution to check which VI is throwing the error (I am thinking it's the first). Have you checked whether you successfully established a connection between LabVIEW and the database?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 9
(3,741 Views)

The error is being thrown by the execute sql query function. So i think there might be some very small mistake with it, but i don't see one. The column i'm checking is a string. Both the table and column i'm searching are correct.

0 Kudos
Message 4 of 9
(3,735 Views)

But what column do you want data from ?

You need to specify a column to get data from in your select.

 

SELECT columnName FROM table1 WHERE ... or

 

SELECT * FROM table1 WHERE ...

0 Kudos
Message 5 of 9
(3,722 Views)

Even if i specify which column to put it in it still has the same error.

 

Also nyc,

 

Even if i make a udl file it shows up as the same error. error.JPG

0 Kudos
Message 6 of 9
(3,713 Views)
Solution
Accepted by Fulmetalal

Change the column name. It seems that Current is reserved.

Message 7 of 9
(3,701 Views)

Thanks, you saved me a couple days of headaches trying to get it to work.

0 Kudos
Message 8 of 9
(3,696 Views)

Sometimes you can work around reserved names by putting the name is square braces.

 

For example: [Current]

0 Kudos
Message 9 of 9
(3,689 Views)