LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDL to mysql 5.7

Hi Sir, 

 

I install the mysql in local PC, and try to create the UDL for connection, but always failed.

 

I am not sure the setting is correct, kindly give some comments.

This maybe is not labview related, but appreciate very much if you can give some comments.

Thanks.

 

 

 

Brzhou123_0-1592659692302.png

 

Keep moving
0 Kudos
Message 1 of 6
(5,444 Views)

Or in another word, what kind of provider should i choose for mysql ?

For this case, i use Microsoft OLE DB provider for SQL server.

Thanks.

Keep moving
0 Kudos
Message 2 of 6
(5,378 Views)

Hola, debes usar Microsoft OLE DB Provider  for OBDC Drivers.

UDL.PNG

 

Message 3 of 6
(5,257 Views)

First of all, you need the ODBC driver for your database and for the bitness of your LabVIEW installed. That is, for a 32Bit LabVIEW, you need the 32Bit driver, regardless of the bitness of the database.

And for the rest, always make sure to use tools for the correct bitness.

 

Create a ODBC connection by pressing [WINDOWS] and typing ODBC. Windows will suggest ODBC Datasources 32Bit and 64Bit.  Choose the same bitness as your LabVIEW.

 

grafik.png

 

Add a new datasource with your driver either as User-, System- or File-DSN

You will be asked for the connection details and can configure further settings.

 

 

Once this is done, you can (but do not want to) create a UDL-file which links to the ODBC connection "MyDSN". Remember, for 32Bit on 64Bit system, you need the correct 32Bit-tool. Use this command to open an existing (even empty) UDL file as 32Bit:

 

C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll", OpenDSLFile C:\x.udl

 

Choose "Microsoft OLE DB Provider for ODBC Drivers" on the provider tab. On the connection tab, "MyDSN" should be available as data source.

 

However:

 

LabVIEW can directly connect to a ODBC connection. Just wire a string "MyDSN" instead of a path to the database open VI. There is no need for an UDL file.

Further more, LabVIEW can use a DSN file instead of a UDL file, too.

 

I always had some trouble to create a File-DSN with the tools shown above. But it is just a text file (like UDL), and looks like this:

 

[ODBC]
DRIVER=MariaDB ODBC 3.0 Driver
Server=ServerIpAddress
User=Me
Password=password123
DATABASE=myDatabase
AUTO_RECONNECT=1

 

By the way: You also just wire the content of an UDL file to the open VI, this does not work for DSN.

Message 4 of 6
(5,247 Views)

hello,

 

You mean just choose that for mysql, no need to install extra drivers ?

Thanks.

Keep moving
0 Kudos
Message 5 of 6
(5,233 Views)

Thanks.

Later i install the odbc driver, then it works.

Keep moving
0 Kudos
Message 6 of 6
(5,230 Views)