12-14-2015 09:49 AM
Hi,
I want to select 'Id' from 'table' where chaine begins with 'BR' the request is like this : SELECT Id FROM table WHERE chaine LIKE 'BR%', it works when i run it in MS Access but when i include it in Labwindows CVI it generate an error ( unknown specifier).
I'm searching for the equivalent of the caracter % .
Note:
Hardware Environment: PC DELL intel(R) Core(TM) 2DUO CPU
Software Environment : Labwindows CVI 2010
Solved! Go to Solution.
12-15-2015 10:48 AM
Hi FENM,
I'm not sure that I completely understand what is happening - would you mind posting a screenshot or sample of the code that isn't working?
--G-IV
12-16-2015 09:19 AM
Hello,
If you use sprintf to format the request, % is the format specifier ==> you must use %% in the format string to escape the format specifier (%)
sprintf (request, "SELECT Id FROM table WHERE chaine LIKE 'BR%%'");
with a string parameter:
sprintf (request, "SELECT Id FROM table WHERE chaine LIKE '%s%%'", "BR");