From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"DB tools set parameter value" not wokring in LV2020?

Solved!
Go to solution

I have some code accessing MySQL quite much, and part of it uses the "DB tools set parameter value" vi to build the sql question. (see screenshot).

Developed in LV2015, works fine as exe file.

But now when I run it on a laptop with LV development 2020, (and LV runtime 2015) I get just zeros back instead of the numerical results. Text results are fine. This is both with the 2015-exe file and 2015 code run in 2020 developer.

 

In later project I decided to build the sql's as concatenated text instead, but still a lot of this "DB tools set parameter value" exist.

 

1. Do I need to remove these "DB tools set parameter value" parts to get it to compile in LV2020?

2. Why does the 2015 exe file not work on my laptop? With 2015 runtime and 2020 dev installed? Should it not use the 2015 runtime?

 

bild.png

 

0 Kudos
Message 1 of 11
(1,665 Views)

@Ola_A wrote:

2. Why does the 2015 exe file not work on my laptop? With 2015 runtime and 2020 dev installed? Should it not use the 2015 runtime?

 


Most likely, the executable has the "Allow future versions of the LabVIEW Runtime to run this application" property enabled. If so, it will use the latest version of LVRT that the computer has. And since you now have LV2020 installed, you have 2020 Runtime too.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 11
(1,649 Views)

That option didn't exist in 2015.  The backwards compatible runtime engine came out in 2018?  I think 2017 was the first version that could choose that setting with 2018 being the first time the RTE worked for older versions.  I could be off by a year with it being 2018/2019.

 

It's more likely this is a newer PC and there's a dependency issue somewhere where the 2020 version is more of a red herring.

Is this the same PC the 2015 exe has been used on historically?

0 Kudos
Message 3 of 11
(1,616 Views)

Redhawk,

where and how do I set this "Allow future versions of the LabVIEW Runtime to run this application" property?

0 Kudos
Message 4 of 11
(1,599 Views)

natasftw,

no, this is a new laptop where I installed LV2020 development and 2015 runtime.

 

My task is to understand what I need to change in the code to make it run (and complie) in LV2020. My first step has been to try to make the SQL call in another way than this DB tools Set Parameter vi. I have demonstrated that a SQL call (made up by text) from labview (or Toad sql tool) works.

 

Is there a good reason why the "DB tools set parameter value" way to call SQL does not work with numbers in LV2020?

 

/O

0 Kudos
Message 5 of 11
(1,598 Views)
Solution
Accepted by Ola_A

I found that my problems with sql code not working in LV 2020 is related to MySQL connector version!

Old ones like mysql-connector-odbc-5.1.9-win32 and mysql-connector-odbc-5.3.4-win32 works fine. But when i install mysql connector 5.3 from mysql-installer-web-community-8.0.26.0 it behaves as described above.

 

It is a little tricky if different versions of MySQL connector 5.3 behaves different!

 

To broaden the question, what SQL connector should I use when using MariaDB 10.1(?) and Labview 2020 or 2015? Does MariaDB give our their own connectors? Does it matter if I use the ansi och unicode version of connector?

 

Message 6 of 11
(1,568 Views)

So it looks like:

 

5.1.9    working

5.3       not working

5.3.4    working

 

I see a pattern called regression here. They changed something for the 5.3 version that broke this functionality and fixed it in one of the later maintenance releases. Something very common in software development.

 

Before LabVIEW had yearly releases their versioning scheme was usually x.y.f. It was very common practice to leave the x.y versions for the tinkerers and front runners and only use x.y.1 or higher for production work! 

Rolf Kalbermatter
My Blog
Message 7 of 11
(1,559 Views)
Solution
Accepted by Ola_A

rolfk, the versions of MySQL connector is a little more tricky than that.

 

If I list the versions I have tried cronologically, as they came out

5.1.9 working

5.3.4 working

5.3.? not working, installed via mysql-installer-web-community-8.0.26.0  (I could choose 5.3 or 8.0) Should be the newest 5.3. made.

8.0.26 working, installed via mysql-installer-web-community-8.0.26.0

 

Anyway I am happy that the newest 8.0 works, if that is true even after more testing I am fine!

Message 8 of 11
(1,550 Views)

Don't you like those version number salades?

 

So you have a mysql installer 8.0.26 which can either install the 5.3.? connector or the 8.0.26 connector! I'm sure it's logical for someone working 8 hours per day on the mysql project but that are only a handful of people on earth. 😀

Rolf Kalbermatter
My Blog
Message 9 of 11
(1,545 Views)

Good find! Such problems are very hard to pin down sometimes.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 11
(1,543 Views)