Jump to content

LabView and MySQL Help


Recommended Posts

I have done quite a bit of searching and have tried a lot of the suggestions but am still having questions.

First off I have the Enterprise Connectivity Add-on for LabView but have yet to figure out what it is and how to use it. :) Any help here would be appreciated

Second, I have used LabSQL and actually got it to connect to my DB but I had to use the MySQL ODBC 3.51 Driver. However, I don't think installing this driver on every PC that I deploy my application on is a very practical solution. After trying everything I can think of I am asking for your help. How can I connect to MySQL without installing any new drivers? Or, how can I automate the installation of the above driver into an installer?

Thanks in Advance!

Link to comment

QUOTE(Noxious @ May 3 2007, 12:36 PM)

The LabVIEW Enterprise Connectivity Toolkit is a LabVIEW add-on that includes three individual toolkits. They do a bunch of things including some pretty advanced statistical stuff, as well as create/write/read databases. You can find out more about it here.

Link to comment
QUOTE(Noxious @ May 2 2007, 07:36 PM)
I have used LabSQL and actually got it to connect to my DB but I had to use the MySQL ODBC 3.51 Driver. However, I don't think installing this driver on every PC that I deploy my application on is a very practical solution.
Perhaps it's not practical in your situation, but essental. I can't think of any other way to connect to a database without a driver of some sort. The MYSQL driver comes with an installer. Do you have an installer for your LabVIEW application already?
Link to comment

i2dx:

I did not quite find a way to add a third party installer using the 'additional installers section' in LabVIEW 8.2 project installer utility. It looks like you can only add installers for NI components from that section. The way that I thought one can do this was by using the 'launch third party application' upon completion of installation; which is available from the advanced tab.

... could you shed some more light on this

Thanks

Anthony L.

Link to comment

QUOTE(i2dx @ May 2 2007, 11:16 PM)

the good news: you can

the bad news: that's really a lot of work - and the reason why people use the myODBC driver ;) . If you really want to connect to a mySQL DB without the ODBC driver you have to connect via TCP/IP and you have to programm the complete mySQL protocoll in LV. I said id before, that's a lot of work. Natvie mySQL Support is on the feature list of my ADO Toolkit for years, but I never had the time to implement that.

If you are using LV 8.2.x then that's easy: just add the myODBC driver installer in the section "additional installers" ... You can add additional installers in older LV versions, too, but that's not so convenienet like in LV 8.2 ...

I also wasnt able to add .MSI files

Link to comment

QUOTE(i2dx @ May 3 2007, 11:27 AM)

just add the myODBC installer in this field, and it will install after your application has been installed. If you need more then one installer or if your installer is an *.msi file, you maybe have to create a batch file, pack all these installers together with the batch file into a self extracting ZIP-file and make the ZIP-file start that batch file after extracting ...

I was able to get the Zip file extractor to work with the batch file... seems like kind of a round about way to do it, but it works.

Link to comment

QUOTE(Noxious @ May 3 2007, 11:51 PM)

I was able to get the Zip file extractor to work with the batch file... seems like kind of a round about way to do it, but it works.

glad to hear it works :)

on the other hand: that leads me to the question, whether it is possible to manipulate the "additional installers" list, by e.g. editing the AppBuilder ressource files?

Link to comment

QUOTE(Michael_Aivaliotis @ May 2 2007, 11:25 PM)

Perhaps it's not practical in your situation, but essental. I can't think of any other way to connect to a database without a driver of some sort. The MYSQL driver comes with an installer. Do you have an installer for your LabVIEW application already?

I'm glad this question has come up. I've been wondering why people embed database access in LabVIEW programs when they can do it in php and make a simple call to execute the php script on the server.

In my application I need to for example look up file names on the server and download them to the local PC. The images are of a patient's surgical wound. The PC uses cURL.exe to send a request to execute GetImageFile.php with parameters username. The php program does its MySQL thing and comes up with a list of files, which can be downloaded in another call to cURL.exe.

Implementing a databse access on a PC requires a) that the PC be a valid host to the database, and b) it must contain the passsword. I have had difficulties with the hosts when I tried to run a LabSQL program from a friend's location. If the password is on many people's computers it's very hard to change it.

If the database access is encapsulated in a web based program on the web server, you have none of these issues, a simple call to a php program is the easiest way to go. It's perhaps a little strange to begin with, but becomes natural with practice.

I'd be glad of any feedback from people who have tried this approach. It is especially good for installing database access on a widely used program. It does do away with the need to install drivers!

Yours Sincerely

John

Link to comment

QUOTE(Noxious @ May 3 2007, 04:51 PM)

You might also want to check out http://nsis.sourceforge.net/Main_Page' target="_blank">NSIS. I've used thier install packager and have been very pleased. It is free, and open source. One potential downside is that it has its own language to build installers with, and you will have to learn it to make more complex installers. The upside is that it has great help files and examples which will guide you through any problems you might have.

Since it can be run from the command line, it can also be setup to rebuild your install package when executing an EXE build (providing you are using the pre/post build VI features of OpenG Builder when building your executable).

Link to comment

We're probably hijacking the thread, but when I need to create a custom (non-LabVIEW) installer, I use Setup2Go from SDSSoftware - it's interface is very similar to InstallShield, it's very easy to use, highly configurable and the free version is fully functional (it only costs $29 to get rid of the nag screen).

Link to comment

QUOTE(crelf @ May 4 2007, 04:46 PM)

We're probably hijacking the thread, but when I need to create a custom (non-LabVIEW) installer, I use http://www.dev4pc.com/setup2go.html' target="_blank">Setup2Go from SDSSoftware - it's interface is very similar to InstallShield, it's very easy to use, highly configurable and the free version is fully functional (it only costs $29 to get rid of the nag screen).

great tip, thanks :) I think I gonna buy it ...

Link to comment

QUOTE(Michael_Aivaliotis @ May 5 2007, 02:33 AM)

Yes, this IS a great tip. My LAVA membership just payed for itself.

The LAVA Premier Option is to buy Setup2GO for $68.95 and get a free* LAVA Premium Membership!

*it's easy: just pay $29 to "Setup2GO" and $39.95 to "LAVA" :P

Link to comment
  • 2 weeks later...

QUOTE(crelf @ May 4 2007, 09:46 AM)

We're probably hijacking the thread, but when I need to create a custom (non-LabVIEW) installer, I use Setup2Go from SDSSoftware - it's interface is very similar to InstallShield, it's very easy to use, highly configurable and the free version is fully functional (it only costs $29 to get rid of the nag screen).

I've used a few times Inno Setup and was quite satisfied with it. For simple installations it is really easy to create a setup script and if you want to go further you can add real code based on a Pascal like syntax but that is really only necessary for your own specifc dialog templates or custom installation steps involving Windows API calls.

And it is free too and often used by Open Source projects for their Windows installer.

Rolf Kalbermatter

Link to comment
  • 8 months later...

QUOTE(jbrohan @ May 4 2007, 05:36 AM)

I'm glad this question has come up. I've been wondering why people embed database access in LabVIEW programs when they can do it in php and make a simple call to execute the php script on the server.

In my application I need to for example look up file names on the server and download them to the local PC. The images are of a patient's surgical wound. The PC uses cURL.exe to send a request to execute GetImageFile.php with parameters username. The php program does its MySQL thing and comes up with a list of files, which can be downloaded in another call to cURL.exe.

Thanks for the tip. I had looked at several solutions to this problem and all looked "too clever by half". This is simple. And since I'll be writing php coded pages for database access and report generation anyway, I won't be duplicating work. My existing php code will still work.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.