LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to prevent empty string being logged?

Solved!
Go to solution

Hi,

 

I am trying to prevent empty string from being logged in a SQL database. If the program work correctly, it will see if two strings are matched. If the two string are matched, the string will be logged to database. If mismatched, the string should not be logged and produce an error message. The problems that I am facing is that the "Match Pattern.vi" produce an empty string if mismatched and still logged to the database. How can I prevent that from happening?

0 Kudos
Message 1 of 3
(225 Views)

The typical way is to use the "offset past match" output and use Greater Or Equal To Zero.  If that is TRUE, then log; if FALSE, do nothing.  This can be easily accomplished with a simple Case Structure.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 2 of 3
(206 Views)
Solution
Accepted by topic author Engineer123
02-18-2019 08:14 PM

Did you try testing the string(s) using the Empty String? function on the Comparison Palette?

 

Bob Schor

Message 3 of 3
(120 Views)