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: 

Labview 2017 x64 & MySQL .NET Connector

Good Morning all, 

 

Up until now I have been using Labview 32bit with the Database Connectivity Toolkit for 70% of my applications. Unfortunately the Database Toolkit is not supported under Labview 64bit so I`m looking for alternative methods of connection. (.NET seems the best option so far)

Can anyone help me with the implementation of the .NET connector in National Instruments Labview. 

I`m trying to set up a simple VI to which I can pass an SQL statement and, depending on that statement, return a string array of data or a confirmation. 

So far i`ve not had any luck using the .NET connector for this. Below is the sequence from my attempt so far; (dataSet is created using System.Data.DataSet(String dataSetName) 

Constructor - MySQLConnection, 
Property Node - MySQLConnection(ConnectionString), 
Property Node - MySQLConnection(OpenAsync), 
Property Node - SqlDataAdaptor(SelectCommandText,SelectConnectionString), 
Property Node - SqlDataAdaptor(Fill,dataSet) 

I`m not sure what I should do next to read the data? Should I use MySQLCommand.ExecuteReader ? I`m guessing I would also need to use .NetObject to Variant and then Variant to Data? 

Any help would be greatly received, ( I know the error lines aren't connected yet ....

Nick

 

 

0 Kudos
Message 1 of 4
(2,439 Views)

I have found it easiest to translate VB.NET code to LabVIEW.

 

https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-programming-net-vb.html

0 Kudos
Message 2 of 4
(2,406 Views)

Hi nyc,

 

Thank you for that info, i`ll have a look through and try to convert to MySQL .NET connector commands.

 

Nick

 

0 Kudos
Message 3 of 4
(2,392 Views)

Just to complete this thread for everyone coming across it newly: You can find a potential answer here: .NET Dataset for LabVIEW 64-bit (without LabVIEW Database Connectivity Toolkit)

 

 


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 4 of 4
(2,362 Views)