LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why DB Tools Execute Query can't work correctly?

I connect to a MS access database using Database Connectivity Toolset(Version 1.0.1).But I can't select the certain data useing DB Tools Execute Query.I have set condition statement to the SQL query (for example:SELECT * FROM testdata WHERE "date=2004-3-12"),but i received all the data of database. That is to say,the condition statement doesn't work.What's wrong?
0 Kudos
Message 1 of 3
(2,957 Views)
when i use DB Tools Select Data node,the same problem visit me.I set condition statement to the "optional clause",I have received all the data in the DB.
0 Kudos
Message 2 of 3
(2,957 Views)
Hello cnxht,

Thank you for your question regarding the DB Connectivity Toolset. You mentioned that you were trying to use the DB Tools Execute Query.vi but you can�t select certain data in a MS access database using the SQL that you mentioned. You may want to use single quotes around the �2004-3-12� string. The following is an example from the sqlcourse website that might help.

This will only select rows where the first name equals 'Eric' exactly.

select * from empinfo
where first = 'Eric';

For more information on SQL, take a look at the following website:

http://www.sqlcourse.com/
.
Other resources can be found on the ni.com website by clicking the support tab at the top of the home page. Then search from Technical Resources at the top of t
he page for your topic. I hope these resources help! Let me know if you need any other support with this issue.

Shea C.
Applications Engineering
Message 3 of 3
(2,957 Views)