LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MS Access LIKE condition returns zero records

Solved!
Go to solution

When using the "WHERE" clause with the "LIKE" condition with the database connectivity toolkit, I get zero records returned from my Access database. Running the exact same query text in MS Access itself returns the correct number of records.

 

I'm using the "DB Open:", DB Execute Query" and then the "Fetch Recordset Data" VIs.

 

Replacing the LIKE with a simple "=" will return the one matching record as expected.

 

Is there a known issue using the "LIKE" condition?

 

 

Bill

LabVIEW 2011 SP1

0 Kudos
Message 1 of 3
(2,568 Views)
Solution
Accepted by topic author BillMe

While old, this may shed some light:

 

http://forums.devarticles.com/microsoft-access-development-49/like-operator-not-working-with-ms-acce...

 

Your LIKE statement may not be properly formed.  Insida Access, the connection is different than through ODBC, and the like wildcards are different as well.

0 Kudos
Message 2 of 3
(2,564 Views)

You are correct. The wildcard character is different for ODBC, should be '%'. Thanks.

0 Kudos
Message 3 of 3
(2,561 Views)