04-15-2024 05:35 AM
Hey everyone,
I am creating a program in my LabVIEW as an executable. I have created a program which checks username and password from MySQL database and then says accepted or rejected. Now I want this program to switch to another VI in the executable itself if the username and password combination is right or display an error if one of it is wrong. How do I do this? I am attaching VI file created in LabVIEW 2020. I have installed a toolkit called MySQLNetCom by HampelSoftware Engineering
Solved! Go to Solution.
04-15-2024 05:51 AM
Hi shreyaskarnad,
@shreyaskarnad wrote:
I want this program to switch to another VI in the executable itself if the username and password combination is right or display an error if one of it is wrong. How do I do this?
Use a case structure and call that "another VI" as subVI in one of its cases. Display the error in the other case…
04-15-2024 05:53 AM
Ok I will try this. One more requirement is that this should happen on clock of the button and not as it is. So how do I do that?
04-15-2024 05:59 AM - edited 04-15-2024 06:00 AM
Hi shreyaskarnad,
@shreyaskarnad wrote:
One more requirement is that this should happen on clock of the button and not as it is.
What is the "clock of the button"?
(When you convert your VI for LV2019 I could examine the "as it is" state…)
04-15-2024 06:00 AM
Oh my bad, sorry for typo, I meant click of the button. As soon as I press the button it should check if the username and password combination is correct and if yes then take me to next VI in same EXE
04-15-2024 06:02 AM
Hi shreyaskandar,
@shreyaskarnad wrote:
As soon as I press the button it should check if the username and password combination is correct
Without being able to look into your VI: use an event structure…
04-15-2024 06:04 AM
Here's the version 19 file
04-15-2024 06:24 AM
Hi shreyaskandar,
there's no button in your VI!
Add a button - and add an event structure.
Compare the database data with user credentials upon "value change" event of your button.
Use a case structure to call a subVI upon successful login…
04-15-2024 10:08 AM - edited 04-15-2024 10:09 AM
Hi sir,
I'm at loss here, I'm still a newbie so doing everything as given in YouTube videos. But this thing, login details check at button press and then heading to another VI is very tough. Again this second VI button press should take me to a third VI. Can you please give me a detailed guide? Because I added button but don't know how to go ahead.
04-15-2024 10:29 AM
Okay so new update, button to check the values I succeeded, now next thing is how to switch to another VI if the login details are correct