LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone recommend a good book, which covers using ActiveX in LabVIEW for MS Access and Excel?


There are so many property and method controls for Access and Excel; it would take me forever to figure out what each one does by trial and error. Thanks I am in desperate need of some help. I have a LabVIEW program that creates 8 different arrays of different data then writes them to 8 different Excel files. I then use MS Access to link directly to these Excel files. That way as the Excel files change the database is automatically updated. I then have a web page designed that connects to this database so that I can run queries from the Internet. My problem is... I would like to eliminate writing to Excel and write directly to MS Access. It took me a
long time trying to figure out how to control Excel using ActiveX with LabVIEW (trial and error SUCKS!) I want to be able to OPEN / CREATE tables in MS Access ADD new fields Delete fields etcetera from within LabVIEW. I don't want to go through the trial and error process all over again. If anyone could help I would really appreciate it. A book recommendation would be great. Or maybe somebody would like to share a VI or 2 with me that they wrote which writes data to an MS Access database. Also, does anyone know of good web sites where people can share VI's? Thanks a lot for you time and help!!!
Greg
gregvowles@hotmail.com
0 Kudos
Message 1 of 7
(3,358 Views)
I don't know if there's any book regarding that, but if you look at a book about Visual Basic for Applications (or online help, in Office 97 at least, with VBA installed) it will help you a lot in knowing about ActiveX calls in LabVIEW. Worked for me.
0 Kudos
Message 2 of 7
(3,358 Views)
Well, Do you have SQL toolkit? This should be the best solution to your situation. Much less to learn than using ActiveX with Access.

Joe
Roush Industries, Inc
Message 3 of 7
(3,358 Views)
I would definitely agree with Joe. I did look into the method of using ActiveX for communicating with Access but it's definitely much easily done with the SQL Toolkit.

FYI, there's a $100 runtime license that you need to get it you distribute the executables using the SQL Toolkit.

There's a new LabVIEW Toolkit that connects easily to MS Office applications. I have not used it myself but have heard nice things about it. It's $495 (MS Office) vs $995 (SQL) if you get the toolkits separately.

Shan Pin Koh
Systems Engineer
OakRiver Technology
0 Kudos
Message 4 of 7
(3,358 Views)
I don't have SQL Toolkit. I don't actually know anything about it. What is it and where do I get it? Do you have any examples without SQL Toolkit?
Thanks, Greg
0 Kudos
Message 5 of 7
(3,358 Views)
There are several ways to do this.
It seems to me that the easiest would be via SQL toolkit. Then you can open your database in LabVIEW and write directly to it.
You have to use ODBC Source administrator or the equivalent to define a global definition of the data source. Use a system DSN to describe / define the path to the Access database you want to write into.
I'd like to find out how to programmatically change the db file to which the DSN points to. Right now, I use one System DSN to point to an Access db and copy over the db file the specific db I want to use at the time.

Another way is to use Access as an ActiveX server, from LabVIEW.
We have two VBA books here, plus of course the VBA on-line documentation and the LabVIEW on-line help and examples. The Ac
tiveX chapter in the book "LabVIEW Advanced Programming Techniques", Bitter, et. al. and the ActiveX examples in the LabVIEW help were the most helpful. I was trying to interface a LabVIEW executable app, an ActiveX server, with Excel VBA though. Using Access as the ActiveX server may or may not be easier. Again there are SOME good examples. The specific version of Access you have may expose different properties and methods than those shown in the examples, however, so you have to be careful.
0 Kudos
Message 6 of 7
(3,358 Views)
Oops, my comments about ODBC and the data source names ASSUME that you're using Windows.
Sorry. I don't know yet how to do that in other OSs.
0 Kudos
Message 7 of 7
(3,358 Views)