06-20-2020 08:30 AM
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.
06-22-2020 11:09 AM
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.
08-25-2020 10:27 AM
Hola, debes usar Microsoft OLE DB Provider for OBDC Drivers.
08-25-2020 01:30 PM - edited 08-25-2020 01:32 PM
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.
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.
08-30-2020 03:47 AM
hello,
You mean just choose that for mysql, no need to install extra drivers ?
Thanks.
08-30-2020 03:49 AM