12-10-2009 01:24 AM
Hi,currently doing my project and quite new to labview here,so do hope that anyone will assist me in my problem=)
I've found an example VI called"retrieving data from access.vi",and it basically opens a access database file and then display all the information onto the display panel.However,I'm not sure where to tap the output of the array so that i can manipulate the data for comparison.
The previous VIs I've only been retrieving data from excel file,and then reading it first column,then all the rows,and then proceed to the next column,all the rows,and repeats.
I've attached a file that i think its the output after the VI reads from access itself before being outputted into a table.
Hope someone will guide me through=)!!!thanks alot in advance!
12-10-2009 12:14 PM - edited 12-10-2009 12:15 PM
SG,
I can understand your confusion with that example as it is using some techniques that are confusing to a beginner. Basically the example is writing to a property node of the front panel list box control(item names). Have you run the example with highlight execution mode on and watch the dataflow? (lightbulb on top toolbar)This example is using Dynamic Data Exchange to 'hook' into Access and retreive the information. DDE is an older technology and these days most people use ActiveX instead. Do you perhaps have the DataBase toolkit for LabVIEW? If you do that will make your life easier. If not there are some free code bits available if you search for them.
Also your attachment did not make it. When you add an attachment don't preview before you post.
12-13-2009 09:03 PM
Hi,
I've tried using the highlight execution mode to watch the dataflow.Sadly,i cannot see the dataflow of the subVIs,which i feel is the crictical part.
So for now ,can i conclude that the subVI (Part1.vi),it reads the application(Access),topic(The file path) and item(Row and column),and then the subVI(Part2.vi) selects the data and then output it into the table?So,can i conclude that in Part1.vi,the "Viewtable part of the case structure " contains the data extracted previously from the other parts of the case structure?I've attached the Viewtable icon expansion VI.Thanks alot for the help!!!!=)!
12-13-2009 09:11 PM
eh sorry,but just to add on,basically I'm trying to read data from access database and then store the data into excel spreadsheet .Hope someone can enlighten me.Thanks!
12-13-2009 09:14 PM
I don't understand what you are saying. The data is the output of the Spreadsheet String to Array and is what is wired to the table/2D String array indicator.
You should really listen to GovBob. The example and DDE are obsolete. Use the LabVIEW Database Toolkit or try LabSQL.
12-13-2009 09:24 PM
oh,haha sorry.The reason Im still using DDE is because I have yet to get the Database toolkit.So instead i was trying to use DDE to get my data.Oh ok,I'll try my LabSQl instead=) Thanks!
12-15-2009 01:30 AM
12-15-2009 09:56 AM
12-15-2009 07:53 PM
12-15-2009 09:15 PM
SG
Well now that you have the DB toolkit you need a way to 'hook' into it. There are 2 ways that I'm familiar with (and I make no claim to being an expert in DataBases). Create a UDL or DSN. Creating a UDL (Universal Data Link) is rather easy. Just right click on an empty spot on your desktop and choose New>>Microsoft Data Link. Double click on the new data link.On the provider tab select Microsoft Jet 4.0 OLE DB Provider press next and then browse to your database. Make sure you test your connection. Now if it works you are good to go.
I wish I knew what your LabVIEW version was. Now just open LabVIEW and go to the example finder. Under toolkits and modules select DataBase Connectivity and Get Database Information.vi. Open the block diagram, delete the subvi called
Get UDL.vi (first on the left, Ctrl+H is your friend). Right click on the connection information input of the DB Tools open connection subvi and select create control. Go back to your front panel and use the folder glyph to browse to the UDL you created. Run the vi and you will get information about your database. From there is depends on the structure of you database.
Hope this helps.
Disclaimer: I assume you are using windows since you mentioned Access and Excel. According to your reply #4 you wanted to move this data to excel. You can just use the export/import functions of Access/Excel to do this without using LabVIEW.