LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL 8.0 Database has no tables that Labview 2021 can see

Solved!
Go to solution

I work in a factory with older MySQL (5.2, 5.3)  servers on site, to enable me to make Database enabled VI's I decided to download MySQL (current -8.0.31.0) and install it on my PC after I cloned some tables to the new server via HeidiSQL I proceeded to try out:

 

  1. make ODBC - 'Test' - with IP set to 127.0.0.1 and user/password 
  2. make UDL - C:\Test.udl - set to ODBC adapter and data source 'Test'
  3. test.png

  4. Run step 3 -> tables array is empty no error messages at all
  5. verify that tables exist in database via HeidiSQL
  6. repeat steps 1-4 changing the IP to the work server and Tables populate as normal 
0 Kudos
Message 1 of 4
(960 Views)

In the past the NI DB Toolkit had some quirks and ugly issues and I never used it. I'm also not familiar with those .udl files, because most time I'm using direct connection strings or .dns files.

 

Your problem sounds like a general issue. If you don't specified a database (schema), then MySQL returns an empty list of tables and no error message. This is correct behavior. Either specify the database within the .udl file or execute a USE sql statement.

 

 

 

 

Message 2 of 4
(911 Views)
Solution
Accepted by topic author Onering20

@Martin_Henz Thank you for telling me about the DNS files I followed the instructions from [NI Knowledge] Create a DSN File to Use With LabVIEW Database Connectivity Toolkit and was successful in connecting 

 

In essence making a File DSN instead of a User/System DSN and skipping step two

Message 3 of 4
(879 Views)

That sounds like a 64/32 bit problem. When you use 32-bit LabVIE you also need to use the 32-bit ODBC Manager to setup DSNs. The ODBC manager in Control Panels refers however to the 64-bit version on 64-bit Windows. You need to launch the one located in <Windows>\SysWOW64.to setup 32-bit ODBC DSNs.

 

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(831 Views)