ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL database access (example provided)

I am having the hardest time figuring out why I don't see the right data when I try to access a MySQL database on the same computer I am running LabView on. When I look at it with the MySQL Control Center (that you can download from www.mysql.com) all the data is easy to access on my local server 'MWC-PROGRAMMER' in the database 'vistavision_db'.

However when I try to access this db with LabView (the VI that I use is attached) I get very different data; almost like configuration tables. No matter what I do, I can't seem to find the 'vistavision_db' anywhere, and only ever get databases like 'msdb', or sometimes, 'master'. Please see my attached VI for more specific details, like ODBC settings, etc.

What do you think I am doing wrong?
0 Kudos
Message 1 of 5
(4,321 Views)
One thing that jumps out at me is that you say you're using a MySQL database but in your program you have a Microsoft SQL Server ODBC setup. Which is correct? You have to use a MySQL ODBC driver with a MySQL database.
0 Kudos
Message 2 of 5
(4,319 Views)
I had a feeling it might be something ridiculously basic.......

It is definitely a MySQL database, but when I try to 'add' a new ODBC data source, I don't see a specific MySQL driver. Is there something I have to download for this? These are the drivers that I can select from (what the non-English means is beyond me!):

Driver da Microsoft para arquivos texto
Driver do Microsoft Access
Driver do Microsoft dBase
Driver do Microsoft Excel
Driver do Microsoft Paradox
Driver para o Microsoft Visual FoxPro
Microsoft Access Driver
Microsoft Access-Treibir
Microsoft dBase Driver
Microsoft dBase VFP Driver
Microsoft dBase-Treibir
Microsoft Excel Driver
Microsoft Excel-Treibir
Microsoft FoxPro VFP Driver
Microsoft ODBC for Oracle
Microsoft Paradox Driver
Microsoft Paradox-Treibir
Microsoft Text Driver
Microsoft Text-Treibir
Microsoft Visual FoxPro Driver
Microsoft Visual FoxPro-Treibir
National Instruments Citadel 4 Database
National Instruments Citadel 5 Database
SQL Server

Message Edited by Synap on 03-09-2005 09:17 AM

0 Kudos
Message 3 of 5
(4,318 Views)
I've only used MySQL briefly and I don't remember exactly where the driver came from. I think it would have been part of the original application installed on the server. I would start at mysql.com and if that doesn't work, you might try googling for it.

Message Edited by Dennis Knutson on 03-09-2005 08:24 AM

0 Kudos
Message 4 of 5
(4,311 Views)
Thanks Dennis! Problem solved!

For anyone who came to this thread searching for a solution, I went to this link: http://dev.mysql.com/doc/mysql/en/installing-myodbc.html

...and downloaded the installer for the MySQL ODBC driver. After installation, I went to the Data Sources (ODBC) manager, and it was real easy to setup (after I selected the correct port!).

Labview accesses the MySQL database like a dream now.

Thanks again.
Message 5 of 5
(4,299 Views)