LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Database Query Issue

Solved!
Go to solution

I am trying to query a database for a particular range of rows.  I am doing this because I don't know exactly what the data looks like in the table and I wanted to see a small portion of it without having to download a large table over a server.

 

I am getting what looks like a syntax error with the search statement I am putting into the DQ Tool Execute Query VI.

 

Error -2147217900 occurred at NI_Database_API.lvlib:Conn Execute.vi->Database Connection_test.vi

Possible reason(s):
ADO Error: 0x80040E14
Exception occured in Microsoft OLE DB Provider for SQL Server: Incorrect syntax near '0'. in NI_Database_API.lvlib:Conn Execute.vi->Database Connection_test.vi

 

My table name is TESTPNTS and my search statement looks like this.  I pieced this together from items I found while searching about this.

 

SELECT * FROM TESTPNTS LIMIT 0, 5

 

If you have any idea as to what I need to change this to get this done I would appreciate some help.  I am using LV 2014 SP1.

 

Thanks.

0 Kudos
Message 1 of 2
(2,729 Views)
Solution
Accepted by topic author JoeWork

try using "SELECT TOP 5 * FROM TESTPNTS"

Message 2 of 2
(2,728 Views)