04-08-2011 11:04 AM
Hi CVI Expert,
I want to find if serial number that i input has already been exist on database or not. I use sql toolkit. My database is MS Access.
Here the code that i tried :
My problem is, the comparison nevers succeed (red text). Can you help me why ?
Regards,
04-08-2011 11:12 AM
Comparing strings works differently. You should use strcmp(string_1, string_2)
04-08-2011 03:46 PM
Yeah, as Wolfgang said, use the ANSI C string compare library function. Look at the help for the strcmp() function. It returns 0 if the strings match.
In ANSI C,
if (uutNum=="8003050013031014")
acutally compares the pointers to the strings, not the string content. That's why you never saw a match.
04-08-2011 06:51 PM
Thank you guys. It works well.![]()