Example Code

How to connect to MySql Database without using Database Connectivity Toolkit LV 2009

Code and Documents

Attachment

Introduction

May connect to SQL server (MySQL i.e.) without using Database Connectivity Toolkit under Windows or Linux OS?

Yes, you can. All you have to do is to:

  1. install the MySQL Server (like the one within xampp) and client of course
  2. customize the sql db with phpmyadmin (included in xampp)
  3. call with Labview the dll function (or other library format under linux) which si provided from the SQL Client in the correct order
  4. That's it

Additional Notes

You'll find an example (LV 2009) of how to get it and the dll.

Here you find a link providing fully documentation of mysql.dll used to connect to MySQL

Matteo Brunella
Application Engineer
NI Italy

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Hana_Auliana
Member
Member
on

Halo Matteo,,

I get curious with what you have there and for your information I am still new with LabView, so can you explain more about this VI?

Because I also want to get the database from phpmyadmin. Should I attached it to web first or can I just get it directly in phpmyadmin to my LV?

Thx before..

Joe_Guo
Active Participant
Active Participant
on

Hello Matteo,

Does this work on connecting to a microsoft sql server (on a window box) from NI Linux RT OS?  I saw the odbc option in the test vi?

Thanks!

Maryemhtb
Member
Member
on

Hello Matteo,

 

I get curious with what you have there . I am new with LabView, so can you explain more about this VI

Because I also want to get a value table from the database phpmyadmin into Labview. I think that doesn't work with windows because you say that it must call with  linux!! Have you the code under windows?

Best regards 

EMAIL: maryem.htb93@gmail.com

 

rolfk
Knight of NI Knight of NI
Knight of NI
on

No, this does not work to connect to MS SQL server from a realtime system. MS SQL Server has its own, not officially documented network protocol that needs its own drivers. There is an open source driver project called FreeTDS that could be used to create a driver that can run on the cRIO but it is not endorsed nor supported by Microsoft for obvious reasons.

Rolf Kalbermatter
My Blog
Contributors